Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alsu master #314

Open
wants to merge 680 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
680 commits
Select commit Hold shift + click to select a range
bd47f53
traveler share page ready
dongliu Feb 19, 2015
6dc4da7
fix userid typo, add shared group in output
dongliu Feb 20, 2015
7123055
add group share traveler tab and table
dongliu Feb 20, 2015
d04bdfc
group shared travelers table ready
dongliu Feb 20, 2015
5e24cad
shared group access control ready
dongliu Feb 20, 2015
ef3dfc3
add more checking for access control
dongliu Feb 20, 2015
86b47af
add group shared tables reload
dongliu Feb 25, 2015
ca22545
reterm trouble report to report a problem
dongliu Feb 27, 2015
9163fb4
clean config
dongliu Feb 27, 2015
b995beb
Merge branch 'group'
dongliu Mar 2, 2015
8db97c5
add group share column to tables
dongliu Mar 2, 2015
70ef4c1
add new share form flash
dongliu Mar 2, 2015
4deffc4
update for release 2.3.8
dongliu Mar 2, 2015
3038b68
change your back to my
dongliu Mar 2, 2015
9a19d62
fix group shared traveler table and the clone button
dongliu Mar 5, 2015
0eeb834
remove table tool from several tabs because of flash problem
dongliu Mar 27, 2015
7115ea4
properly render the err response
dongliu Mar 27, 2015
efd6f83
update typeahead to 0.10.5
dongliu Mar 27, 2015
b0b7412
use the latest ladpjs 1.7.2+ fix ladp page issue
dongliu Mar 27, 2015
17a86e2
add option for mongo connection
dongliu Apr 17, 2015
322ecb0
add mongo connection timeout
dongliu Apr 17, 2015
66e792f
user proper mongoose err for logging
dongliu Apr 24, 2015
3195b28
select only from viewable
dongliu Apr 24, 2015
6e4721b
fix devices on traveler page
dongliu Apr 28, 2015
a216d42
update typeahead to 0.11
dongliu Apr 28, 2015
db02bd5
update typeahead encoding device name
dongliu Apr 28, 2015
b518ef5
fix ldapjs to 1.7.1, limit ldap search company
dongliu Apr 29, 2015
6bc3535
fix typo
dongliu Apr 30, 2015
3cdc629
ignore npm log properly
dongliu Apr 30, 2015
e5ef108
update config client no poll enable reconnect
dongliu Apr 30, 2015
87e5de7
problem fixed for 0.7.1
dongliu Apr 30, 2015
64fbdfe
close ldap connections when application exits
dongliu Apr 30, 2015
8518ad2
user names bloodhound seperated
dongliu Apr 30, 2015
3cf91af
check if ajax url already takes care of prefix
dongliu Apr 30, 2015
eafc39f
group id typeahead ready
dongliu Apr 30, 2015
819cddc
use /login for redirect from cas
dongliu May 18, 2015
3b24834
fix /login with session, and cas reject ticket
dongliu May 18, 2015
efea435
update auth_change
dongliu May 18, 2015
8f287bb
fix update url for proxy
dongliu May 18, 2015
1b79422
fix note for textarea
dongliu May 18, 2015
c9d98b8
prefix not handled by jquery ajax prefilter
dongliu May 20, 2015
92c4a25
handle update images in form by name
dongliu May 20, 2015
7608e63
update traveler v1 link
dongliu May 28, 2015
16a6444
clean up
dongliu Jun 3, 2015
b9c924c
enable uploading xps
dongliu Jun 22, 2015
9a00395
Create LICENSE.md
dongliu Nov 4, 2015
6fe4a27
Delete README.md
dongliu Nov 4, 2015
63b94c2
Delete LICENSE.md
dongliu Nov 4, 2015
ea5bdb9
Create LICENSE.md
dongliu Nov 4, 2015
0761e80
Merge the project progress back onto git.
iTerminate Nov 4, 2015
1501587
Add changed files
iTerminate Nov 4, 2015
0bf32df
Merge pull request #1 from dongliu/master
iTerminate Nov 4, 2015
1eeb782
Create README.md
iTerminate Nov 5, 2015
fb85fdc
Do not open pages from the traveler module in new tabs
iTerminate Nov 5, 2015
e48c863
Do not open pages from the traveler module in new tabs
iTerminate Nov 5, 2015
dc5501b
Add a new view for generating all forms for a user with the role 'rea…
iTerminate Nov 6, 2015
238851b
Add new role for having read access to all forms
iTerminate Nov 6, 2015
056a449
add new editor file type to gitignore
iTerminate Nov 6, 2015
66b63bc
Remove repetition from the source code by implementing functions. Thi…
iTerminate Nov 6, 2015
a98f003
Add utilties folder to hold functions that can be used across multipl…
iTerminate Nov 6, 2015
6db6074
Add function that will be reused to utilties and implement the new ve…
iTerminate Nov 6, 2015
40d1b30
Implement a new cloning feature for forms for which the user atleast …
iTerminate Nov 6, 2015
7eace27
Fix the role to see all forms
iTerminate Nov 6, 2015
f53ea27
Add a feature to allow an admin to specify default roles for a user i…
iTerminate Nov 6, 2015
5a794ba
Add a new role to write to all travelers
iTerminate Nov 9, 2015
bb4db3a
Check the role to write_active_travelers
iTerminate Nov 9, 2015
79ad036
Add a utility that checks if a user has a certain role
iTerminate Nov 9, 2015
5139b43
Take advantage of the new role allowing a user to write to all travelers
iTerminate Nov 9, 2015
b7ed1fb
Use the new utility for checking roles
iTerminate Nov 9, 2015
ea43d4e
Change the title to login on the login page
iTerminate Nov 9, 2015
6e95bc5
enforce lower case for use id, send too if new user is not saved, bet…
dongliu Nov 9, 2015
5be282d
Improve configuration managament and use the configuration controller…
iTerminate Nov 9, 2015
2b2f26d
ignore more config json files
dongliu Nov 9, 2015
294ed56
Add global configuration for views, use a standard object for render …
iTerminate Nov 9, 2015
3cb447a
Add support for legacy traveler configuration, do not query legacy tr…
iTerminate Nov 9, 2015
1bdf200
Do not show devices related links when the devices service is not spe…
iTerminate Nov 9, 2015
5dff543
add eslint to dev dep and config file, jsformat config for support
dongliu Nov 10, 2015
39b8bf3
eslint app.js
dongliu Nov 10, 2015
84bd78a
Add a ui configuration file and terminology configurations, this is u…
iTerminate Nov 10, 2015
c55a431
add more rules to eslint
dongliu Nov 10, 2015
678e2dd
hide all forms table for no roles, eslint main.js
dongliu Nov 10, 2015
15d9c0d
add lint section to readme
dongliu Nov 10, 2015
1bf34c4
update readme and licence
dongliu Nov 10, 2015
19cc155
test commit lint app.js
iTerminate Nov 10, 2015
ee2fe43
Merge remote-tracking branch 'dongliu/master'
iTerminate Nov 10, 2015
fb30fe8
merge
iTerminate Nov 10, 2015
b21dcec
Fix eslint problem by rearagning the file
iTerminate Nov 10, 2015
b8dc3a0
Fix users for api authentication. Knowing the app_port would work jus…
iTerminate Nov 10, 2015
03f302e
Add api for creating forms
iTerminate Nov 11, 2015
c77ffdd
Add functionality to create travelers from the API. Globalize the cre…
iTerminate Nov 12, 2015
738ca2c
Update configuration scripts to work with the new configuration files
iTerminate Nov 12, 2015
4f9bb1a
Add functionality to API to fetch forms and specific form.
iTerminate Nov 23, 2015
52f72fd
Add support for fetching a display value for a device from its reposi…
iTerminate Nov 30, 2015
bd12b03
Use the new configuration to show proper devices page
iTerminate Nov 30, 2015
03eb455
Add a new configuration for services template
iTerminate Nov 30, 2015
c6fbca4
Take advantage of the new value controllers for devices apps
iTerminate Nov 30, 2015
00623a9
Allow html tags to be generated for devies
iTerminate Nov 30, 2015
3387807
Call the method that gets the deviceRemovableProperty.
iTerminate Dec 1, 2015
a6e1874
Add functionality to fetch design elements from cdb.
iTerminate Dec 3, 2015
79804bd
Improve error checking when processing server response. Add service p…
iTerminate Dec 3, 2015
7974713
Improve display of Component Instances when multiple components are a…
iTerminate Dec 4, 2015
19dce49
List the allowed roles for easier configuration
iTerminate Dec 4, 2015
ccdfded
Improve the fetching of multiple devices with the new routes utilitie…
iTerminate Dec 4, 2015
80dd91a
Rename the dev config file to traveler config to suggest default conf…
iTerminate Dec 16, 2015
25311eb
Rename the configuration file
iTerminate Dec 16, 2015
f4f5bcd
Add default values to the openssl certificate generation utility
iTerminate Dec 16, 2015
543104a
eslint cdb devices controller and add comments to all the funcitons
iTerminate Dec 16, 2015
70b2f55
Rename mongo-express configuration file
iTerminate Dec 16, 2015
800e09b
start to use gh-pages for web pages
dongliu Dec 16, 2015
1aa1c95
Remove prompts from the daemon script for mongo-express and store the…
iTerminate Dec 16, 2015
839c95c
Remove prompts in the traveler-mongodb daemon script.
iTerminate Dec 16, 2015
538ca71
Fix bash bug when setting default variable value
iTerminate Dec 16, 2015
986e087
Replace the port line in the configuration file
iTerminate Dec 16, 2015
16002bb
Update README.md
iTerminate Dec 16, 2015
f82bdb8
Add a traveler passwd file
iTerminate Dec 17, 2015
d9bf748
Update the readme
iTerminate Dec 17, 2015
465ed51
fix the mongo server port replacement
iTerminate Dec 17, 2015
e5c3ee9
Fix the bug, used wrong enviorment variable for temporary storage
iTerminate Dec 17, 2015
03e1cc3
Refer directly to github tag number allowing the user to go directly …
iTerminate Dec 18, 2015
49b524f
Prepare for a new release, APS-0.1.1
iTerminate Dec 18, 2015
cdd0a4c
Update README.md
iTerminate Dec 18, 2015
ec03358
Update README.md
iTerminate Dec 18, 2015
6b34b1a
move latest release to top of releases file
iTerminate Dec 18, 2015
39c3c8b
fix the side nav bar, and update active form index
dongliu Dec 21, 2015
9f0b382
Fix version to follow the node standards
iTerminate Dec 22, 2015
0937776
add eslint file
dongliu Dec 22, 2015
baca9d4
update form in traveler model for updating
dongliu Dec 28, 2015
1abffae
add mange form button
dongliu Dec 28, 2015
9d7321c
clean and add form manager route
dongliu Dec 28, 2015
aabe855
clean up
dongliu Jan 4, 2016
2090177
add form manager table element
dongliu Jan 4, 2016
cc3bc49
log new user properly
dongliu Jan 6, 2016
8d7d164
change url
dongliu Jan 6, 2016
d022708
update buttons
dongliu Jan 6, 2016
2153b45
update preview column
dongliu Jan 6, 2016
e1a8e18
update table selected row style and clean up
dongliu Jan 6, 2016
8bd4ca8
add select row event handler
dongliu Jan 6, 2016
e1dc7f1
use form loader to render form and data
dongliu Jan 11, 2016
714a5e4
clean up and change route url
dongliu Jan 11, 2016
88ef3dd
update side nav in form viewer
dongliu Jan 12, 2016
7ce7b56
add a default ajax handler
dongliu Jan 12, 2016
55d4a45
add a route for form json
dongliu Jan 12, 2016
afeef61
add side nav
dongliu Jan 19, 2016
e37c93d
sort updated time first
dongliu Jan 19, 2016
9d29511
add retrieve form function
dongliu Jan 19, 2016
abaa9fe
switch and load form from local and service ready
dongliu Jan 19, 2016
3bc2786
set alias ready
dongliu Jan 20, 2016
8135e20
add new form to traveler ready
dongliu Jan 21, 2016
4d9fa62
init the used form tables and use modal for add form confirmation
dongliu Jan 22, 2016
07de316
update git ignore
dongliu Jan 22, 2016
9761a39
ignore uploads directory or link
dongliu Jan 22, 2016
3a09644
Merge branch 'change-form' into FRIB
dongliu Jan 25, 2016
a69a896
change button text
dongliu Jan 29, 2016
55c8c08
use object id to identify active form
dongliu Jan 29, 2016
eb5aac6
use object id for used form, update total input number when form changed
dongliu Jan 29, 2016
3d8317a
update finished input when loading
dongliu Jan 29, 2016
0b7c70d
Merge branch 'change-form' into FRIB
dongliu Jan 29, 2016
5a67e42
handle missing forms
dongliu Jan 29, 2016
3ae6df0
Merge branch 'change-form' into FRIB
dongliu Jan 29, 2016
7a93d09
change button text
dongliu Feb 2, 2016
6e81bd1
update about route and link
dongliu Feb 2, 2016
8941b98
Merge branch 'change-form' into FRIB
dongliu Feb 2, 2016
7042d58
add form manager manual page
dongliu Feb 2, 2016
33872f2
handle only one form and activeForm is not _id case
dongliu Feb 2, 2016
8f97936
Merge branch 'change-form' into FRIB
dongliu Feb 2, 2016
26479a0
update form manager manual
dongliu Feb 2, 2016
d94c905
update release text
dongliu Feb 2, 2016
2f1f4ad
update release number
dongliu Feb 2, 2016
2884f0a
use string for safe convert
dongliu Feb 3, 2016
8d87ff7
handle no alias for old forms in traveler
dongliu Feb 3, 2016
37f99c6
Add functionality to perform mongodb backups and restorations
iTerminate Feb 5, 2016
ad3e168
Do not send mongo output to stderr only send it when an error occured.
iTerminate Feb 5, 2016
aabec88
fix traveler viewer form load
dongliu Feb 16, 2016
f2f95f1
add group alias to session
dongliu Feb 16, 2016
ff9f2c9
sanitize the added form
dongliu Feb 17, 2016
7a0b00d
Update package.json
iTerminate Feb 22, 2016
c131095
use absulute time instead of from now
dongliu Mar 17, 2016
47ba151
only show error message for 400+ status
dongliu Mar 25, 2016
eac3706
allow to update finished input for status 1 or 1.5
dongliu Mar 25, 2016
425b810
fix typo
dongliu Mar 30, 2016
ff77cb4
update device m v c and tt for new device list
dongliu Mar 30, 2016
3aba514
mark new release 2.4.1
dongliu Mar 30, 2016
2ce6ae4
explicit log in
dongliu Apr 1, 2016
44a0cd3
increase upload file size to 10MB
dongliu Apr 11, 2016
69fd7cd
Merge branch 'rc/frib' into FRIB
dongliu Apr 11, 2016
38f584c
Merge two FRIB and APS Branch
iTerminate Apr 11, 2016
223683c
Add fix to satisfy the newer framework of the traveler module.
iTerminate Apr 12, 2016
1c6f939
Allow html tags to be displayed from devices list.
iTerminate Apr 12, 2016
38afddb
Update the configuration script to copy the new group alias configura…
iTerminate Apr 12, 2016
1f7cc35
Add filter body all method to routes utility for consitency and poten…
iTerminate Apr 12, 2016
ccbaf74
Get rid of filter body all and use routes utility version. Fix a bug …
iTerminate Apr 12, 2016
b5795ba
Merge pull request #4 from iTerminate/FRIB-APS-Mer
iTerminate Apr 12, 2016
52bbac6
Merge pull request #22 from iTerminate/FRIB-APS-Mer
dongliu Apr 12, 2016
6975cec
Add reused traveler functinality to routes utilities; standardize the…
iTerminate Apr 15, 2016
efcf70b
Remove functionality in routes utilty and replace usage to use routes…
iTerminate Apr 15, 2016
c4d21dc
Add functionlaiy to the API that allows configuration of a traveler.
iTerminate Apr 15, 2016
65bd4df
Add release notes for next release of the traveler-aps app.
iTerminate Apr 15, 2016
3145d34
Merge pull request #5 from dongliu/master
iTerminate Apr 15, 2016
6ebc0b4
Fix version issue in nodejs
iTerminate Apr 25, 2016
92bc33d
Fix the bug with users not being able to view other peoples travelers…
iTerminate May 26, 2016
0da7420
Add new release notes.
iTerminate May 26, 2016
c60e3df
Update cdb communication code to now fetch item and item elements as …
iTerminate Oct 3, 2016
b7296ea
Update revision of traveler application for the new release.
iTerminate Oct 3, 2016
866baea
Update package.json
iTerminate Oct 27, 2016
2cb0f9b
Merge latest branch from FRIB with latest branch from APS
iTerminate Oct 19, 2017
68e9224
Resolve issue preventing preview site from working.
iTerminate Oct 19, 2017
8f414a2
Add view for all forms when the user has appropriate role.
iTerminate Oct 26, 2017
f9c66d4
Resolve issues with a missing routes utility.
iTerminate Oct 27, 2017
47b1acd
Roles should be part of the render object.
iTerminate Oct 27, 2017
8c885c1
Utilize the render object to be used for appropriate view information…
iTerminate Oct 27, 2017
cf6c2b5
Remove roles that will likely not be needed in the new version with t…
iTerminate Oct 27, 2017
34265a6
Utilize the configuration to disable fetching for shared users and sh…
iTerminate Oct 27, 2017
79eaf62
Utilize the target setting as well as define a form clone column func…
iTerminate Oct 27, 2017
e6230ef
Apply the link target setting to all the links generated from javascr…
iTerminate Oct 27, 2017
afd5238
Resolve issues with usage of tag field without devices application.
iTerminate Oct 27, 2017
8b10a32
Add a clone column to public forms.
iTerminate Oct 27, 2017
58be5c9
Add more customizations in configuration. Particualary to allow to di…
iTerminate Oct 27, 2017
d8d8b7b
Clean up the interface and hide any nonworking functionality using co…
iTerminate Oct 27, 2017
45686de
Add a default public state to configurations.
iTerminate Oct 30, 2017
23f2efd
Add routes utiltiy to the share page of binders.
iTerminate Oct 30, 2017
ae6cc6a
Allow the api to parse json data client requests.
iTerminate Nov 16, 2017
a40d457
Stanard name for travelers is now travelerIds
iTerminate Nov 16, 2017
19771e4
Move the add work functionality to the utlities and add functioanlity…
iTerminate Nov 16, 2017
12004c6
Add api functionality to get binder, binders, create binder, add work…
iTerminate Nov 16, 2017
985bcfb
Merge pull request #7 from iTerminate/dongliu-rc/frib
iTerminate Nov 16, 2017
3f4c932
Merge pull request #8 from iTerminate/binder-api
iTerminate Nov 16, 2017
13aa979
Add html snippets for adding a radio button to a traveler form.
iTerminate Nov 28, 2017
c3a887a
Add logic for creation and editing of radio buttons.
iTerminate Nov 28, 2017
d403890
Add support for radio button multi-input layout, as it consits of mul…
iTerminate Nov 28, 2017
372fe94
Add a radio button option to the dropdown.
iTerminate Nov 28, 2017
c38449e
Apply a space after for the radio button label.
iTerminate Nov 28, 2017
154a668
Resolve the issues with total input count to group inputs of the same…
iTerminate Nov 28, 2017
798809a
Resolve the issue with not displaying the cdb reference in the new tr…
iTerminate Jan 24, 2018
7bbb5ac
Merge pull request #70 from iTerminate/master
iTerminate Jan 31, 2018
167265c
Update version in package.json
iTerminate Jan 31, 2018
8fe7a72
Update release.txt
iTerminate Jan 31, 2018
be5f70d
Update version tag
iTerminate Jan 31, 2018
b1f285c
Resolve the issues with the uploaded files not showing up and the upl…
iTerminate Feb 5, 2018
01ccc7e
Merge pull request #72 from iTerminate/master
iTerminate Feb 5, 2018
e75a721
Update package.json
iTerminate Feb 5, 2018
cf9f7c3
Update release.txt
iTerminate Feb 5, 2018
0607fbc
Resolve issue that stopped traveler from loading with file uplads. Cl…
iTerminate Mar 1, 2018
001bc91
Use the file name as the download name.
iTerminate Mar 1, 2018
3732218
Merge pull request #75 from iTerminate/master
iTerminate May 21, 2018
6667af1
add docker files, configurations, and doc
dongliu Jun 17, 2018
3b0f75f
Merge pull request #76 from AdvancedPhotonSource/docker-dev
dongliu Jun 28, 2018
544b9cd
fix openssl and update mongo config (#83)
dongliu Jan 9, 2019
2915dac
Docker instruction (#91)
dongliu Sep 12, 2021
efb0745
Merge branch 'master' of github.com:AdvancedPhotonSource/traveler int…
dongliu Sep 19, 2021
5c95adb
Merge branch 'master' into alsu-master
dongliu Sep 19, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:12-alpine
FROM node:14-alpine
RUN apk update && \
apk add openssl

Expand All @@ -8,19 +8,10 @@ RUN apk add --no-cache tini
ENTRYPOINT ["/sbin/tini", "--"]
# web port
EXPOSE 3001
# api port
EXPOSE 3443
# api port if https enabled
# EXPOSE 3443

COPY . /app
# create the certification file for ssl
WORKDIR /app/docker
RUN PASSWORD=$(openssl rand -hex 16) && \
openssl genrsa -des3 -passout "pass:${PASSWORD}" -out server.pass.key 2048 && \
openssl rsa -passin "pass:${PASSWORD}" -in server.pass.key -out server.key && \
rm server.pass.key && \
openssl req -new -key server.key -out server.csr \
-subj "/C=US/ST=WA/L=Seattle/O=Traveler/OU=Dev/CN=example.com" && \
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
WORKDIR /app
RUN npm install --only=prod
RUN npm install -g [email protected]
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ For detailed deployment instructions please see https://confluence.aps.anl.gov/d
./etc/init.d/traveler-webapp start
# Check progress of traveler-webapp
./etc/init.d/traveler-webapp status

**Installing docker version (not for production use, but good for development and evaluation)**

1. centos docker install (centos) https://docs.docker.com/install/linux/docker-ce/centos/
1. centos docker install (centos) https://docs.docker.com/install/linux/docker-ce/centos/
* uninstall old docker versions
```
sudo yum remove docker \
Expand Down Expand Up @@ -68,7 +68,7 @@ For detailed deployment instructions please see https://confluence.aps.anl.gov/d
```
sudo systemctl enable docker
```
* install docker-compose https://docs.docker.com/compose/install/
* install docker-compose https://docs.docker.com/compose/install/
```
sudo curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
Expand All @@ -83,17 +83,17 @@ For detailed deployment instructions please see https://confluence.aps.anl.gov/d
sudo docker network create -d bridge --subnet 172.18.1.0/24 traveler-dev
```
3. install dependencies
* traveler-mongo https://github.com/dongliu/traveler-mongo
* traveler-mongo https://github.com/dongliu/traveler-mongo
* clone git repo
```
git clone https://github.com/dongliu/traveler-mongo.git (to e.g., ~/git/traveler)
```
* run traveler-mongo
```
sudo docker-compose up
sudo docker-compose up
```
* access mongo express at http://localhost:8081. The username is traveler, and password is travelerpass.
* traveler-ldap https://github.com/dongliu/traveler-ldap
* traveler-ldap https://github.com/dongliu/traveler-ldap
* clone git repo
```
git clone https://github.com/dongliu/traveler-ldap.git
Expand All @@ -104,7 +104,7 @@ For detailed deployment instructions please see https://confluence.aps.anl.gov/d
```
* test
* You can check the state of the openladp service via the php ldap admin web https://localhost:6443. There is a default admin account that you can use to log in user name: cn=admin,dc=example,dc=org password: admin
4. install traveler https://github.com/AdvancedPhotonSource/traveler
4. install traveler https://github.com/AdvancedPhotonSource/traveler
* clone git repo
```
git clone https://github.com/AdvancedPhotonSource/traveler.git
Expand Down
10 changes: 5 additions & 5 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,16 +190,16 @@ app.get('/apis', function(req, res) {
// Start application using settings
var appPort = appSettings.app_port;
var server;
if (appSettings.ssl_key !== undefined) {
if (appSettings.ssl_key) {
var appCredentials = {
key: fs.readFileSync('./' + configPath + '/' + appSettings.ssl_key),
cert: fs.readFileSync('./' + configPath + '/' + appSettings.ssl_cert),
};
server = https.createServer(appCredentials, app).listen(appPort, function() {
logger.info('Express server listening on ssl port ' + appPort);
logger.info('Express server listening on ssl port ' + app.get('port'));
});
} else {
server = http.createServer(app).listen(app.get('port'), function() {
server = http.createServer(app).listen(appPort, function() {
logger.info('Express server listening on port ' + app.get('port'));
});
}
Expand All @@ -221,7 +221,7 @@ require('./routes/api')(api);

//Start Api using settings
var apiserver;
if (apiSettings.ssl_key !== undefined) {
if (apiSettings.ssl_key) {
var apiCredentials = {
key: fs.readFileSync('./' + configPath + '/' + apiSettings.ssl_key),
cert: fs.readFileSync('./' + configPath + '/' + apiSettings.ssl_cert),
Expand All @@ -233,7 +233,7 @@ if (apiSettings.ssl_key !== undefined) {
logger.info('API server listening on ssl port ' + api.get('port'));
});
} else {
apiserver = http.createServer(api).listen(api.get('port'), function() {
apiserver = http.createServer(api).listen(apiPort, function() {
logger.info('API server listening on port ' + api.get('port'));
});
}
Expand Down
10 changes: 6 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
version: "3"
networks:
default:
external:
name: traveler-dev
external: true
name: traveler-dev
services:
web:
build: .
volumes:
- .:/app
# exclude the node_modules
- /app/node_modules
- /app/docker
# exclude the docker configuration
# - /app/docker
ports:
- "3001:3001"
- "3443:3443"
- "3002:3002"
# - "3443:3443"
restart: unless-stopped
command: nodemon app.js
environment:
Expand Down
31 changes: 26 additions & 5 deletions docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,20 @@

## install docker

See <https://docs.docker.com/install/> for instructions.
See <https://docs.docker.com/get-docker/> for instructions.

You will alos need to install docker compose if it does not come with docker, see <https://docs.docker.com/compose/install/#install-compose>.
After installation finished, start the docker desktop, configure it for CPU, memory, and storage that you want it to use on your machine.

Check if the docker desktop has `docker-compose` installed on your machine. If not, you need to install docker compose, see <https://docs.docker.com/compose/install/>.

## create development network

The traveler application and its dependencies will be running in the same network named `traveler-dev`. Run the following to create the network.
Clone this repo to your local environment. Make sure you have the `traveler-dev` network in the docker.
```
docker network list
```

If not, run the following in your console to create the network.

```
docker network create -d bridge --subnet 172.18.1.0/24 traveler-dev
Expand All @@ -28,15 +35,19 @@ The traveler application can be run by running
docker-compose up
```

The traveler application can be accessed at <https://localhost:3001>
The traveler application can be accessed at <http://localhost:3001>

If you want to server the application or the api on https, add `ssl_key` and `ssl_cert` configurations in the `app.json` and `api.json` files. You will need valid key and cert files in the `docker` directory, and set the values of `ssl_key` and `ssl_cert` to the name of the files.

When you run for the first time, docker will build the image for you. If the application does not start successfully, try

```
docker-compose --verbose up
```

for detailed information. You should also check the logs of mongodb and open ldap service to see if there is an issue with those services. You can ssh into the running container with `docker exec -it traveler-aps_web_1 /bin/bash`, where `traveler-aps_web_1` is the running container name.
for detailed information. You should also check the logs of mongodb and open ldap service to see if there is an issue with those services. You can ssh into the running container with `docker exec -it traveler_web_1 /bin/sh`, where `traveler_web_1` is the running container name.

`docker container list` shows all the containers running on your local.

Run

Expand All @@ -47,3 +58,13 @@ docker-compose down
to stop the appplication.

You can run with `docker-compose up -d` in a detached mode. Then you can run `docker-compose logs -f` to check the application log.

## rebulid without cache

```
docker-compose build --no-cache
```

## clean the traveler docker image

Run `docker image list` to see the images on your local. `docker image remove image_name` to clean the image from yoru local.
4 changes: 1 addition & 3 deletions docker/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@
"api_read": "api_read_password",
"api_write": "api_write_password"
},
"app_port" : "3443",
"ssl_key": "server.key",
"ssl_cert": "server.crt"
"app_port" : "3002"
}
2 changes: 0 additions & 2 deletions docker/app.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"org_name": "Lab",
"app_port": "3001",
"ssl_key": "server.key",
"ssl_cert": "server.crt",
"top_bar_urls": [
{
"text": "Link",
Expand Down
4 changes: 2 additions & 2 deletions docker/auth.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "ldap",
"service": "https://localhost:3001",
"login_service": "https://localhost:3001/login",
"service": "http://localhost:3001",
"login_service": "http://localhost:3001/login",
"default_roles": [
"read_all_forms",
"write_public_travelers"
Expand Down
Loading