Skip to content
This repository was archived by the owner on Nov 9, 2022. It is now read-only.

Commit e10f224

Browse files
authored
Merge pull request #106 from kghmanuel/feature-103-alt
Feature 103 - convert project to use Roxy
2 parents 15bfd58 + 1d10a0a commit e10f224

File tree

129 files changed

+36358
-14
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+36358
-14
lines changed

config/webserver-settings.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
# CREATED BY YEOMAN generator-mljsworkplace!
44

5-
RESTHOST=192.168.123.4
6-
RESTPORT=6061
5+
RESTHOST=localhost
6+
RESTPORT=8040
77
DATABASE=workflow-content
88
MLADMINUSER=admin
99
MLADMINPASS=admin

deploy/app_specific.rb

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
#
2+
# Put your custom functions in this class in order to keep the files under lib untainted
3+
#
4+
# This class has access to all of the private variables in deploy/lib/server_config.rb
5+
#
6+
# any public method you create here can be called from the command line. See
7+
# the examples below for more information.
8+
#
9+
class ServerConfig
10+
11+
#
12+
# You can easily "override" existing methods with your own implementations.
13+
# In ruby this is called monkey patching
14+
#
15+
# first you would rename the original method
16+
# alias_method :original_deploy_modules, :deploy_modules
17+
18+
# then you would define your new method
19+
# def deploy_modules
20+
# # do your stuff here
21+
# # ...
22+
23+
# # you can optionally call the original
24+
# original_deploy_modules
25+
# end
26+
27+
#
28+
# you can define your own methods and call them from the command line
29+
# just like other roxy commands
30+
# ml local my_custom_method
31+
#
32+
# def my_custom_method()
33+
# # since we are monkey patching we have access to the private methods
34+
# # in ServerConfig
35+
# @logger.info(@properties["ml.content-db"])
36+
# end
37+
38+
#
39+
# to create a method that doesn't require an environment (local, prod, etc)
40+
# you woudl define a class method
41+
# ml my_static_method
42+
#
43+
# def self.my_static_method()
44+
# # This method is static and thus cannot access private variables
45+
# # but it can be called without an environment
46+
# end
47+
end
48+
49+
#
50+
# Uncomment, and adjust below code to get help about your app_specific
51+
# commands included into Roxy help. (ml -h)
52+
#
53+
54+
#class Help
55+
# def self.app_specific
56+
# <<-DOC.strip_heredoc
57+
#
58+
# App-specific commands:
59+
# example Installs app-specific alerting
60+
# DOC
61+
# end
62+
#
63+
# def self.example
64+
# <<-DOC.strip_heredoc
65+
# Usage: ml {env} example [args] [options]
66+
#
67+
# Runs a special example task against given environment.
68+
#
69+
# Arguments:
70+
# this Do this
71+
# that Do that
72+
#
73+
# Options:
74+
# --whatever=value
75+
# DOC
76+
# end
77+
#end

deploy/build.properties

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
#################################################################
2+
# This file contains overrides to values in default.properties
3+
# Make changes here, not in default.properties
4+
#################################################################
5+
6+
#
7+
# Admin username/password that will exist on the local/dev/prod servers
8+
#
9+
user=admin
10+
password=admin
11+
12+
# Your Application's name
13+
app-name=workflow
14+
15+
# The root of your modules database or filesystem dir
16+
modules-root=/
17+
18+
# The prefix for your modules in the modules database
19+
modules-prefix=/
20+
21+
#
22+
# The location of your shared.properties file if you choose to use one
23+
# Using a shared.properties file will overwrite anything in build.properties
24+
# shared.properties will be overwritten by anything in environment.properties (eg. dev.properties)
25+
# Useful for maintaining properties in a git submodule used across multiple distinct apps
26+
#
27+
# Config file location is relative to the project root
28+
#
29+
# shared_config=shared/shared.properties
30+
31+
#
32+
# the location of your marklogic configuration file
33+
#
34+
# config.file=${basedir}/deploy/ml-config.xml
35+
36+
#
37+
# the location of your triggers configuration file
38+
# see sample at deploy/sample/triggers-config.sample.xml
39+
#
40+
# triggers.file=#{basedir}/deploy/triggers-config.xml
41+
42+
#
43+
# Unit Testing
44+
# Leave commented out for no unit testing
45+
# turn these on if you are using the roxy unit tester
46+
# Note: to activate Unit Testing, you must have test-content-db and test-port defined
47+
#
48+
test-content-db=${app-name}-content-test
49+
test-modules-db=${app-name}-modules
50+
test-port=8042
51+
52+
# The unit tests that come with Roxy require some privileges that we might not
53+
# want to grant to all users. The ${app-name}-unit-test role has those
54+
# privileges and also inherits from ${app-name}-role. To create a user for the
55+
# testing role, uncomment the two following properties. You can also run unit
56+
# tests as admin.
57+
# test-user=${app-name}-test-user
58+
# test-user-password=%N{7o3f;EB}RSb-N/W)l
59+
#
60+
# The authentication method used for your test appserver
61+
# application-level, basic, digest, digestbasic
62+
#
63+
# test-authentication-method=digest
64+
#
65+
# end of Unit Testing section
66+
67+
#
68+
# Leave commented out for default
69+
#
70+
# schemas-db=${app-name}-schemas
71+
72+
#
73+
# Leave commented out for default
74+
# turn it on if you are using triggers or CPF
75+
# Note: you should use an application-specific triggers database, rather than
76+
# the "Triggers" database that is automatically created. Using an application-
77+
# specific database ensures that triggers won't conflict with each other, and
78+
# that the "ml {env} clean triggers" command won't affect other applications.
79+
#
80+
triggers-db=${app-name}-triggers
81+
82+
#
83+
# the port that the Docs appserver is running on
84+
# Docs appserver is required for boostrapping
85+
# set this to 8000 for ML 4.x and 8002 for ML 5.x
86+
# you should only override this if your Docs appserver
87+
# is running on a funky port
88+
#
89+
# bootstrap-port=
90+
91+
#
92+
# The ports used by your application
93+
#
94+
app-port=8040
95+
xcc-port=8041
96+
# odbc-port=8043
97+
98+
## Separate REST api instance
99+
#
100+
# In case you don't want to expose a REST api directly, or want to
101+
# run a REST api next to a different app server, uncomment the
102+
# rest-port property. Additionally you can override modules-db,
103+
# auth method, and default user as well:
104+
#
105+
# rest-port=8044
106+
# rest-modules-db=${app-name}-rest-modules
107+
# rest-authentication-method=${authentication-method}
108+
# rest-default-user=${default-user}
109+
110+
#
111+
# set this to false if you are using an existing XCC server and
112+
# you don't want Roxy to manage it for you
113+
#
114+
# install-xcc=true
115+
116+
## Security
117+
#
118+
# The authentication method used for your appserver
119+
# application-level, basic, digest, digestbasic
120+
#
121+
authentication-method=digest
122+
#
123+
# The authentication used for your XDBC server
124+
# basic, digest, digestbasic
125+
#
126+
xdbc-authentication-method=digest
127+
# The user used as the default user in application level authentication.
128+
# Using the admin user as the default user is equivalent to turning security off.
129+
#
130+
# default-user=${app-name}-user
131+
#
132+
# The password assigned to the default user for your application
133+
#
134+
appuser-password=5cPeht38`|NU32OX_?+H
135+
#
136+
# To make your http appserver use TLS/SSL, uncomment the ssl-certificate-template
137+
# here and uncomment the ssl-certificate-template element in ml-config.xml.
138+
#
139+
# To create a template, uncomment at least ssl-certificate-template,
140+
# ssl-certificate-countryName, and ssl-certificate-oranizationName
141+
# ssl-certificate-template=roxy
142+
# ssl-certificate-countryName=US
143+
# ssl-certificate-stateOrProvinceName=LA
144+
# ssl-certificate-localityName=New Orleans
145+
# ssl-certificate-organizationName=Zulu Krewe
146+
# ssl-certificate-organizationalUnitName=BeadBase
147+
# ssl-certificate-emailAddress=changeme@example.com
148+
#
149+
# end of Security section
150+
151+
#
152+
# The type of application. Choices are:
153+
# bare: a bare Roxy app project
154+
# mvc: a normal, XQuery-based Roxy MVC app
155+
# rest: an app based on the ML6 REST API
156+
# hybrid: an app that uses Roxy rewriting and the ML6 REST API
157+
#
158+
app-type=rest
159+
160+
#
161+
# The major version of MarkLogic server you are using
162+
# 6, 7, 8
163+
#
164+
server-version=8
165+
166+
#
167+
# the location of your REST API options
168+
# relevant to app-types rest and hybrid.
169+
#
170+
rest-options.dir=${basedir}/rest-api/config
171+
172+
#
173+
# the location of your REST API extension modules
174+
# relevant to app-types rest and hybrid.
175+
#
176+
rest-ext.dir=${basedir}/rest-api/ext
177+
178+
#
179+
# the location of your REST API transform modules
180+
# relevant to app-types rest and hybrid.
181+
#
182+
rest-transforms.dir=${basedir}/rest-api/transforms
183+
184+
#
185+
# The Roxy rewriter handles both Roxy MVC and the ML REST API
186+
#
187+
url-rewriter=/MarkLogic/rest-api/rewriter.xml
188+
error-handler=/MarkLogic/rest-api/error-handler.xqy
189+
rewrite-resolves-globally=true
190+
191+
#
192+
# the uris or IP addresses of your servers
193+
# WARNING: if you are running these scripts on WINDOWS you may need to change localhost to 127.0.0.1
194+
# There have been reported issues with dns resolution when localhost wasn't in the hosts file.
195+
#
196+
local-server=localhost
197+
#dev-server=
198+
#prod-server=
199+
200+
#
201+
# If you want to use MLCP, make sure mlcp-home is configured correctly. Using a common location as default.
202+
#
203+
mlcp-home=/usr/local/mlcp
204+
mlcp-vmargs=-Xmx512m
205+
206+
# folder to ignore when deploying into modules database
207+
#ignore-folders=.*/src/(node_modules|.tmp)/.*
208+
209+
# enable the following to save and upload svn/git commit info upon deploy modules
210+
save-commit-info=false

0 commit comments

Comments
 (0)