generated from open-source-uc/osuc-template
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yml
91 lines (84 loc) · 1.8 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
89
90
91
version: '3.8'
networks:
caddy:
api:
services:
planner:
build: ./frontend
container_name: planner-web
restart: always
ports:
- "80:80"
- "443:443"
networks:
- caddy
depends_on:
- api
env_file:
- ./frontend/.env.production
volumes:
- caddy_data:/data
- caddy_config:/config
api:
build: ./backend
container_name: planner-api
restart: always
ports:
- "8000:80"
networks:
- caddy
- api
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- ./siding-mock-data:/siding-mock-data
- ./static-curriculum-data:/static-curriculum-data
env_file:
- ./backend/.env.default
- ./backend/.env
db:
image: postgres:15
container_name: planner-db
restart: always
networks:
- api
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: postgres
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
redis:
image: redis:7
container_name: planner-redis
restart: always
networks:
- api
command: redis-server --save 60 1
volumes:
- redis-data:/data
healthcheck:
test: [ "CMD-SHELL", "redis-cli ping | grep -q PONG" ]
cas_mock_server:
# Run a local cas mock server container for developing purposes.
# Don't run this service in production.
image: node:16-alpine
restart: always
working_dir: /app
ports:
- "3004:3004"
networks:
- caddy
volumes:
- ./cas-mock/data/cas-mock-users.json:/app/data/cas-mock-users.json
volumes:
postgres-data:
redis-data:
caddy_config:
caddy_data:
external: true