-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
93 lines (88 loc) · 1.9 KB
/
docker-compose.dev.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
92
93
version: '3.9'
services:
db:
image: postgres:14-alpine
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: s3ase
POSTGRES_USER: s3ase
POSTGRES_DB: s3ase
redis:
image: redis
container_name: s3ase-redis
environment:
- ALLOW_EMPTY_PASSWORD=yes
ports:
- 6379:6379
volumes:
- redis_data:/data
db-migration:
container_name: s3ase-db-migration
build:
context: ./backend
dockerfile: Dockerfile
entrypoint: ["./s3ase", "migrate", "up"]
depends_on:
- db
env_file:
- .env
ports:
- 5555:5555
environment:
- DB_DRIVER=postgres
- DB_USER=s3ase
- DB_PASSWORD=s3ase
- DB_DATABASE=s3ase
- DB_HOST=db
- DB_PORT=5432
volumes:
- ./backend/src:/app/src
backend:
container_name: s3ase-api
build:
context: ./backend
dockerfile: Dockerfile
entrypoint: ["./s3ase", "server"]
depends_on:
db:
condition: service_started
redis:
condition: service_started
db-migration:
condition: service_completed_successfully
env_file:
- .env
ports:
- 5555:5555
environment:
- DB_DRIVER=postgres
- DB_USER=s3ase
- DB_PASSWORD=s3ase
- DB_DATABASE=s3ase
- DB_HOST=db
- DB_PORT=5432
volumes:
- ./backend/src:/app/src
frontend:
container_name: s3ase-frontend
restart: unless-stopped
depends_on:
- backend
build:
context: ./frontend
dockerfile: Dockerfile
volumes:
- ./frontend/src:/app/src/ # mounted whole src to avoid missing reload on new files
- ./frontend/public:/app/public
env_file: .env
environment:
- NODE_ENV=development
- SESSION_SECRET=s3ase
volumes:
postgres-data:
driver: local
redis_data:
driver: local