-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
56 lines (52 loc) · 1017 Bytes
/
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
services:
client:
build:
context: ./client
dockerfile: Dockerfile
ports:
- "3000:3000"
volumes:
- ./client:/app
- /app/node_modules
environment:
- API_URL=${API_URL}
env_file:
- .env
depends_on:
- server
server:
build:
context: ./server
dockerfile: Dockerfile
ports:
- "8080:8080"
volumes:
- ./server:/usr/src/app
env_file:
- .env
depends_on:
- db
- redis
command: air ./server/cmd/main.go -b 0.0.0.0
db:
image: postgres:alpine
container_name: postgresql
env_file:
- .env
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
ports:
- 5432:5432
volumes:
- postgres-db:/var/lib/postgresql/data
redis:
image: redis:alpine
container_name: redis
ports:
- 6379:6379
env_file:
- .env
volumes:
postgres-db: