-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
56 lines (50 loc) · 1.15 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
version: '3.8'
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: go-booking-app
ports:
- "8686:8080"
networks:
- local_network
#depends_on:
# - db
environment:
- DB_HOST=db
- DB_USER=postgres
- DB_PASSWORD=postgres
- DB_NAME=bookings
- DB_PORT=5432
restart: always
db:
container_name: postgres
restart: always
image: postgres:16.1-alpine3.18
ports:
- "5432:5432"
networks:
- local_network
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- postgres_data:/var/lib/postgresql/data
# adminer is a web-based database management tool
adminer:
image: adminer:4.8.1-standalone
container_name: adminer-go
hostname: adminer
restart: always
ports:
- "9090:8080"
networks:
- local_network
volumes:
postgres_data:
networks:
local_network:
# Run Postgres without docker-compose
# docker run -it --name postgres-container -p 5432:5432 -e POSTGRES_PASSWORD=postgres postgres:16.1-alpine3.18