forked from darkallure/Go-lang-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
56 lines (54 loc) · 1.11 KB
/
docker-compose.yaml
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.7"
services:
backend:
build: backend
container_name: rest-container
hostname: rest-hostname
secrets:
- db-password
depends_on:
- db
networks:
- mynet
ports:
- 80:8080
deploy:
restart_policy:
condition: on-failure
db:
image: postgres:latest
restart: always
container_name: db_container
hostname: db
networks:
- mynet
ports:
- 26257:26257
- 6543:5432
secrets:
- db-password
volumes:
- db-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=example
- POSTGRES_PASSWORD_FILE=/run/secrets/db-password
- POSTGRES_USER = docker
- POSTGRES_DB = docker_database
pgadmin:
image: dpage/pgadmin4
depends_on:
- db
ports:
- "5555:80"
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: admin
restart: unless-stopped
volumes:
db-data:
secrets:
db-password:
file: db/password.txt
networks:
mynet:
driver: bridge