Skip to content

Commit 470c6f3

Browse files
authored
Merge branch 'master' into development
2 parents f215214 + 243723d commit 470c6f3

File tree

6 files changed

+106
-5
lines changed

6 files changed

+106
-5
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,4 @@ api/*.js.map
3939
# ssl certs we ignore the content of the folder but keep the folder around.
4040
nginx/ssl/*
4141
!nginx/ssl/.gitkeep
42-
43-
*__pycache__*
42+
*__pycache__*

docker-compose-production.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
version: "3"
2+
networks:
3+
ezbids:
4+
5+
services:
6+
mongodb:
7+
container_name: brainlife_ezbids-mongodb
8+
image: mongo:4.4.15
9+
platform: linux/amd64
10+
volumes:
11+
- /data/db
12+
healthcheck:
13+
test: echo 'db.runCommand("ping").ok' | mongo localhost:27017/test --quiet
14+
interval: 10s
15+
timeout: 10s
16+
retries:
17+
5
18+
networks:
19+
- ezbids
20+
21+
api:
22+
container_name: brainlife_ezbids-api
23+
build: .
24+
platform: linux/amd64
25+
volumes:
26+
- ./api:/app/api
27+
- /tmp:/tmp
28+
depends_on:
29+
mongodb:
30+
condition: service_healthy
31+
healthcheck:
32+
test: ["CMD", "curl", "-f", "http://localhost:8082/health"]
33+
working_dir: /app/api
34+
command:
35+
./dev.sh
36+
environment:
37+
MONGO_CONNECTION_STRING: mongodb://mongodb:27017/ezbids
38+
BRAINLIFE_AUTHENTICATION: ${BRAINLIFE_AUTHENTICATION}
39+
networks:
40+
- ezbids
41+
42+
handler:
43+
container_name: brainlife_ezbids-handler
44+
build: ./handler
45+
platform: linux/amd64
46+
volumes:
47+
- .:/app
48+
- /tmp:/tmp
49+
depends_on:
50+
mongodb:
51+
condition: service_healthy
52+
api:
53+
condition: service_healthy
54+
environment:
55+
MONGO_CONNECTION_STRING: mongodb://mongodb:27017/ezbids
56+
networks:
57+
- ezbids
58+
tty: true #turn on color for bids-validator output
59+
command: pm2 start handler.js --attach
60+
61+
ui:
62+
container_name: brainlife_ezbids-ui-builder
63+
env_file:
64+
- .env
65+
build: ./ui
66+
platform: linux/amd64
67+
volumes:
68+
- ./ui/dist:/ui/dist
69+
environment:
70+
VITE_APIHOST: https://${SERVER_NAME}/api
71+
VITE_BRAINLIFE_AUTHENTICATION: ${BRAINLIFE_AUTHENTICATION}
72+
73+
# by default this is not enabled, add COMPOSE_PROFILES=telemetry to your .env
74+
telemetry:
75+
container_name: brainlife_ezbids-telemetry
76+
build: ./telemetry
77+
platform: linux/amd64
78+
depends_on:
79+
- mongodb
80+
profiles: ["telemetry"]
81+
networks:
82+
- ezbids
83+
84+
nginx:
85+
env_file:
86+
- .env
87+
container_name: brainlife_ezbids-nginx
88+
depends_on:
89+
- ui
90+
- api
91+
image: nginx:latest
92+
platform: linux/amd64
93+
ports:
94+
- 443:443
95+
networks:
96+
- ezbids
97+
volumes:
98+
- ${SSL_CERT_PATH}:/etc/nginx/conf.d/ssl/sslcert.cert
99+
- ${SSL_KEY_PATH}:/etc/nginx/conf.d/ssl/sslcert.key
100+
- ${SSL_PASSWORD_PATH}:/etc/nginx/conf.d/ssl/sslpassword
101+
- ./nginx/production_nginx.conf:/etc/nginx/conf.d/default.conf
102+
- ./ui/dist:/usr/share/nginx/html/ezbids:ro

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ services:
6565

6666
ui:
6767
container_name: brainlife_ezbids-ui
68+
env_file:
69+
- .env
6870
build: ./ui
6971
platform: linux/amd64
7072
environment:

example.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# of echo $HOSTNAME
55
SERVER_NAME=localhost
66

7+
78
# Set the BRAINLIFE_USE_NGINX environment variable to true to use https"
89
# (this will launch the services on port 443) and run with nginx/production_nginx.conf"
910
# this will require providing the correct paths for the SSL_CERT_PATH, SSL_KEY_PATH and SSL_PASSWORD_PATH
@@ -33,4 +34,3 @@ PRESORT=false
3334
# can set a custom workingdir/temp dir all uploaded files and work will be performed in
3435
# this directory, defaults to /tmp/ezbids-workdir in the docker compose file if it's not set here.
3536
EZBIDS_TMP_DIR=
36-

handler/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
FROM neurodebian:nd20.04-non-free
22

3-
43
SHELL ["/bin/bash", "-c"]
54

65
ENV DEBIAN_FRONTEND noninteractive

launch.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ else
6767
mkdir -p ${EZBIDS_TMP_DIR}
6868
fi
6969

70-
7170
# ok docker compose is now included in docker as an option for docker
7271
if [[ $(command -v docker-compose) ]]; then
7372
# if the older version is installed use the dash

0 commit comments

Comments
 (0)