-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
90 lines (84 loc) · 1.78 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
version: "3.8"
services:
database:
image: postgres:latest
ports:
- "5432:5432"
restart: always
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- database-data:/var/lib/postgresql/data/
dummy-database:
image: postgres:latest
ports:
- "5433:5433"
restart: always
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
command: -p 5433
backend:
image: backend
build:
context: ./backend
dockerfile: Dockerfile.dev
depends_on:
- database
- redis
ports:
- "8888:8888"
restart: always
env_file:
- .env
# deploy:
# resources:
# limits:
# cpus: '1.00'
# memory: 1024M
# reservations:
# cpus: '1.00'
# memory: 1024M
develop:
watch:
- action: rebuild
path: docker-compose.yaml
- action: sync
path: ./backend
target: ./app
- action: rebuild
path: ./backend/go.mod
frontend:
image: frontend
restart: always
build:
context: ./frontend
dockerfile: Dockerfile.dev
ports:
- 3000:3000
env_file:
- .env
develop:
watch:
- action: sync
path: ./frontend
target: ./app
ignore:
- node_modules
- .next
- action: rebuild
path: ./frontend/package.json
redis:
image: redis:latest
restart: always
ports:
- "6379:6379"
environment:
- REDIS_PASSWORD=${REDIS_PASSWORD}
- REDIS_PORT=6379
- REDIS_DATABASES=16
volumes:
database-data: