-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (42 loc) · 856 Bytes
/
docker-compose.yml
File metadata and controls
46 lines (42 loc) · 856 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
version: "3.9"
services:
server:
build:
context: .
dockerfile: Dockerfile
container_name: "go_app"
restart: on-failure
depends_on:
- postgres
environment:
- HTTP_IP=0.0.0.0
- HTTP_PORT=9000
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
tty: true
networks:
- app_network
ports:
- "9000:9000"
postgres:
image: postgres
restart: always
container_name: "postgres_db"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
ports:
- "5432:5432/tcp"
volumes:
- data:/var/lib/postgresql/data
networks:
- app_network
volumes:
data:
networks:
app_network:
driver: bridge