forked from apluslms/dolos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
88 lines (87 loc) · 2.16 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: dolos
services:
db:
image: mariadb:11
volumes:
- dolos-db-data:/var/lib/mysql
environment:
MARIADB_ROOT_PASSWORD: dolos
networks:
- dolos
healthcheck:
start_period: 2s
interval: 5s
test: healthcheck.sh --su-mysql --connect --innodb_initialized
web:
image: ghcr.io/dodona-edu/dolos-web
# build: ./web/
ports:
- "8080:8080"
environment:
VITE_HOST: 0.0.0.0
VITE_PORT: 8080
VITE_API_URL: http://localhost:3000
VITE_MODE: server
depends_on:
- api
networks:
- dolos
healthcheck:
start_period: 2s
interval: 5s
test: curl --fail http://localhost:8080 || exit 1
api:
image: ghcr.io/dodona-edu/dolos-api
# build: ./api/
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails db:prepare && bundle exec rails s -p 3000 -b '0.0.0.0'"
volumes:
- dolos-api-storage:/dolos/storage
- /tmp:/tmp
ports:
- "3000:3000"
environment:
DOLOS_API_FRONT_END_URL: http://localhost:8080
DOLOS_API_URL: http://localhost:3000
DOLOS_API_DATABASE_USERNAME: root
DOLOS_API_DATABASE_PASSWORD: dolos
DOLOS_API_DATABASE_HOST: db
RAILS_ENV: production
RAILS_LOG_TO_STDOUT: true
SECRET_KEY_BASE_DUMMY: true
depends_on:
db:
condition: service_healthy
networks:
- dolos
healthcheck:
start_period: 2s
interval: 10s
test: curl --fail "$$DOLOS_API_URL/up" || exit 1
worker:
image: ghcr.io/dodona-edu/dolos-api
# build: ./api/
command: bash -c "bundle exec rails jobs:work"
volumes:
- dolos-api-storage:/dolos/storage
- /tmp:/tmp
- /var/run/docker.sock:/var/run/docker.sock
environment:
DOLOS_API_DATABASE_USERNAME: root
DOLOS_API_DATABASE_PASSWORD: dolos
DOLOS_API_DATABASE_HOST: db
RAILS_ENV: production
SECRET_KEY_BASE_DUMMY: true
RAILS_LOG_TO_STDOUT: true
depends_on:
- api
networks:
- dolos
healthcheck:
start_period: 2s
interval: 5s
test: ruby -e true || exit 1
volumes:
dolos-db-data:
dolos-api-storage:
networks:
dolos: