-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
62 lines (57 loc) · 1.29 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
version: '3'
services:
go-api:
container_name: go-api
build:
context: .
dockerfile: ./Dockerfile.local
restart: unless-stopped
networks:
- go-api-store-network
environment:
API_PORT: 5555
DATABASE_HOST: go-store
DATABASE_PORT: 5432
DATABASE_USERNAME: root
DATABASE_PASSWORD: root
DATABASE_NAME: goApiStoreDB
GIN_MODE: release
ports:
- 5555:5555
depends_on:
- go-store
go-store:
container_name: go-store
image: postgres:14
restart: always
environment:
POSTGRES_USER: 'root'
POSTGRES_PASSWORD: 'root'
volumes:
- postgres:/var/lib/postgresql/data
- ./src/infrastructure/database/scripts/create-database.sql:/docker-entrypoint-initdb.d/create-database.sql
ports:
- '5432:5432'
networks:
- go-api-store-network
go-orm:
container_name: go-orm
build:
context: .
dockerfile: ./Dockerfile.orm
networks:
- go-api-store-network
environment:
DATABASE_HOST: go-store
DATABASE_PORT: 5432
DATABASE_USERNAME: root
DATABASE_PASSWORD: root
DATABASE_NAME: goApiStoreDB
depends_on:
- go-store
volumes:
postgres:
networks:
go-api-store-network:
name: go-api-store
driver: bridge