mirror of
https://github.com/UniversityOfHelsinkiCS/oodikone.git
synced 2026-10-12 19:03:39 +03:00
197 lines
4.8 KiB
YAML
197 lines
4.8 KiB
YAML
x-defaults: &defaults
|
|
restart: unless-stopped
|
|
|
|
x-build_defaults: &build_defaults
|
|
target: development
|
|
|
|
services:
|
|
|
|
adminer:
|
|
<<: *defaults
|
|
container_name: adminer
|
|
environment:
|
|
ADMINER_DESIGN: pepa-linha
|
|
image: adminer:4.8.0
|
|
ports:
|
|
- 5050:8080
|
|
volumes:
|
|
- ./adminer-plugins:/var/www/html/plugins-enabled
|
|
|
|
backend:
|
|
<<: *defaults
|
|
build:
|
|
<<: *build_defaults
|
|
context: services/backend
|
|
container_name: backend
|
|
depends_on:
|
|
- kone-db
|
|
- redis
|
|
- sis-db
|
|
environment:
|
|
DB_URL_KONE: postgres://postgres@kone-db:5432/kone-db
|
|
FRONT_URL: http://localhost:3000
|
|
REDIS: redis
|
|
SECRET_TOKEN: dev
|
|
SIS_DB_URL: postgres://postgres@sis-db:5432/sis-db
|
|
SIS_UPDATER_URL: http://sis-updater-scheduler:8082
|
|
TOKEN_SECRET: IWannaBeTheVeryBest
|
|
USERSERVICE_SECRET: Luukk4inenApprov3dVitunMinttuSalainenAvain666NurmivaaraPJ2019
|
|
USERSERVICE_URL: http://userservice:4567
|
|
ports:
|
|
- 8080:8080
|
|
profiles:
|
|
- oodikone
|
|
volumes:
|
|
- backend-nodemod:/usr/src/app/node_modules
|
|
- ./services/backend/:/usr/src/app
|
|
|
|
frontend:
|
|
<<: *defaults
|
|
build:
|
|
<<: *build_defaults
|
|
context: services/frontend
|
|
container_name: frontend
|
|
ports:
|
|
- 3000:3000
|
|
profiles:
|
|
- oodikone
|
|
volumes:
|
|
- frontend-nodemod:/usr/src/app/node_modules
|
|
- ./services/frontend/:/usr/src/app
|
|
|
|
kone-db:
|
|
<<: *defaults
|
|
container_name: kone-db
|
|
image: registry.toska.cs.helsinki.fi/kone-db
|
|
profiles:
|
|
- oodikone
|
|
volumes:
|
|
- kone-db-data:/data
|
|
|
|
redis:
|
|
<<: *defaults
|
|
command: "redis-server --appendonly yes"
|
|
container_name: redis
|
|
image: redis
|
|
ports:
|
|
- "6379:6379"
|
|
volumes:
|
|
- redis-data:/data
|
|
|
|
sis-db:
|
|
<<: *defaults
|
|
container_name: sis-db
|
|
image: registry.toska.cs.helsinki.fi/sis-db
|
|
volumes:
|
|
- sis-db-data:/data
|
|
|
|
sis-importer-db:
|
|
<<: *defaults
|
|
container_name: sis-importer-db
|
|
image: registry.toska.cs.helsinki.fi/sis-importer-db
|
|
profiles:
|
|
- updater
|
|
volumes:
|
|
- sis-importer-db-data:/data
|
|
|
|
sis-updater-nats:
|
|
<<: *defaults
|
|
command: "-cid sis-updater-nats -m 8222 -p 4222 --max_age 2h --hb_fail_count 2 --hb_timeout 10s --hb_interval 10s --auth dev --file_slice_max_bytes 0 --file_slice_max_age 60s --max_msgs 0 -store file -dir datastore"
|
|
container_name: sis-updater-nats
|
|
image: nats-streaming:0.16.2
|
|
profiles:
|
|
- updater
|
|
|
|
sis-updater-scheduler:
|
|
<<: *defaults
|
|
build:
|
|
<<: *build_defaults
|
|
context: updater/sis-updater-scheduler
|
|
container_name: sis-updater-scheduler
|
|
depends_on:
|
|
- redis
|
|
- sis-importer-db
|
|
- sis-updater-nats
|
|
environment:
|
|
REDIS_URI: //redis:6379
|
|
SECRET_TOKEN: dev
|
|
SIS_IMPORTER_DATABASE: sis-importer-db
|
|
SIS_IMPORTER_HOST: sis-importer-db
|
|
SIS_IMPORTER_PASSWORD: postgres
|
|
SIS_IMPORTER_USER: postgres
|
|
SIS_NATS_TOKEN: dev
|
|
SIS_NATS_URI: sis-updater-nats://sis-updater-nats:4222
|
|
ports:
|
|
- 8082:8082
|
|
profiles:
|
|
- updater
|
|
volumes:
|
|
- sis-updater-scheduler-nodemod:/usr/src/app/node_modules
|
|
- ./updater/sis-updater-scheduler/:/usr/src/app
|
|
|
|
sis-updater-worker:
|
|
<<: *defaults
|
|
build:
|
|
<<: *build_defaults
|
|
context: updater/sis-updater-worker
|
|
depends_on:
|
|
- redis
|
|
- sis-db
|
|
- sis-importer-db
|
|
- sis-updater-nats
|
|
environment:
|
|
DB_URL: postgres://postgres@sis-db:5432/sis-db
|
|
REDIS_URI: //redis:6379
|
|
SIS_IMPORTER_DATABASE: sis-importer-db
|
|
SIS_IMPORTER_HOST: sis-importer-db
|
|
SIS_IMPORTER_PASSWORD: postgres
|
|
SIS_IMPORTER_USER: postgres
|
|
SIS_NATS_TOKEN: dev
|
|
SIS_NATS_URI: sis-updater-nats://sis-updater-nats:4222
|
|
profiles:
|
|
- updater
|
|
volumes:
|
|
- sis-updater-worker-nodemod:/usr/src/app/node_modules
|
|
- ./updater/sis-updater-worker/:/usr/src/app
|
|
|
|
user-db:
|
|
<<: *defaults
|
|
container_name: user-db
|
|
image: registry.toska.cs.helsinki.fi/user-db
|
|
profiles:
|
|
- oodikone
|
|
volumes:
|
|
- user-db-data:/data
|
|
|
|
userservice:
|
|
<<: *defaults
|
|
build:
|
|
<<: *build_defaults
|
|
context: services/userservice
|
|
container_name: userservice
|
|
depends_on:
|
|
- user-db
|
|
environment:
|
|
DB_URL: postgres://postgres@user-db:5432/user-db
|
|
SECRET: Luukk4inenApprov3dVitunMinttuSalainenAvain666NurmivaaraPJ2019
|
|
TOKEN_SECRET: IWannaBeTheVeryBest
|
|
ports:
|
|
- 4567:4567
|
|
profiles:
|
|
- oodikone
|
|
volumes:
|
|
- userservice-nodemod:/usr/src/app/node_modules
|
|
- ./services/userservice/:/usr/src/app
|
|
|
|
volumes:
|
|
backend-nodemod:
|
|
frontend-nodemod:
|
|
kone-db-data:
|
|
redis-data:
|
|
sis-db-data:
|
|
sis-importer-db-data:
|
|
sis-updater-scheduler-nodemod:
|
|
sis-updater-worker-nodemod:
|
|
user-db-data:
|
|
userservice-nodemod:
|