-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
49 lines (46 loc) · 970 Bytes
/
docker-compose.yml
File metadata and controls
49 lines (46 loc) · 970 Bytes
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
services:
api:
image: tiagodreadd/todo-api
platform: linux/x86_64
build:
context: .
dockerfile: Dockerfile
restart: always
container_name: api
ports:
- "8080:8080"
environment:
POSTGRES_PASSWORD: 1234
POSTGRES_USER: postgres
POSTGRES_DB: postgres
POSTGRES_HOST: db
GIN_MODE: debug
depends_on:
- db
networks:
- todo-network
db:
image: tiagodreadd/todo-db
platform: linux/x86_64
build:
context: .
dockerfile: Dockerfile.db
container_name: database
restart: always
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
- ./initdb.sql:/docker-entrypoint-initdb.d/init.sql
environment:
POSTGRES_PASSWORD: 1234
POSTGRES_USER: postgres
POSTGRES_DB: postgres
POSTGRES_HOST: db
networks:
- todo-network
volumes:
pgdata: {}
networks:
todo-network:
driver: bridge