|
| 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 |
0 commit comments