-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
57 lines (52 loc) · 1.06 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
version: "3"
services:
blog_app:
container_name: go_blog_app
build:
context: .
dockerfile: Dockerfile
env_file:
- ./.env
ports:
- 8000:8000
depends_on:
blog_db:
condition: service_healthy
volumes:
- ./:/blog
networks:
- go-blog-net
blog_db:
image: postgres:13
container_name: go_blog_app_db
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=123456
- POSTGRES_DB=goblog
volumes:
- goblog_postgres:/var/lib/postgresql/data
networks:
- go-blog-net
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
blog_pgadmin:
container_name: pgadmin4_container
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: root
ports:
- "5050:80"
depends_on:
blog_db:
condition: service_healthy
networks:
- go-blog-net
volumes:
goblog_postgres:
networks:
go-blog-net:
driver: bridge