-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
45 lines (43 loc) · 912 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
version: "3.8"
services:
web:
build: ./backend
env_file:
- .env
ports:
- "8080:8080"
volumes:
- .:/usr/src/app/
command: air ./main.go -b localhost
db:
image: postgres:alpine
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
ports:
- "5432:5432"
volumes:
- postgres-db:/var/lib/postgresql/data
restart: always
redis:
image: redis:latest
volumes:
- ./data/redis:/data
ports:
- "6379:6379"
testdb:
image: postgres:alpine
environment:
- POSTGRES_USER=${DB_TEST_USER}
- POSTGRES_PASSWORD=${DB_TEST_PASSWORD}
- POSTGRES_DB=${DB_TEST_NAME}
ports:
- "5433:5433"
volumes:
- postgres-test-db:/var/lib/postgresql/data
restart: always
command: -p 5433
volumes:
postgres-db:
postgres-test-db: