-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
57 lines (53 loc) · 1.3 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.5'
services:
foodmarket-api:
image: golang:alpine
working_dir: /usr/src/app/
command: sh -c "go run ."
container_name: foodmarket-api
ports:
- 1233:1233
restart: on-failure
volumes:
- .:/usr/src/app/
depends_on:
- foodmarket-db # Uncomment this when using postgres.
networks:
- fullstack
foodmarket-db:
image: 'postgres:alpine'
container_name: foodmarket-db
hostname: foodmarket-db
environment:
- POSTGRES_USER=userfoodmarketdb
- POSTGRES_PASSWORD=foodmarketdb123
- POSTGRES_DB=foodmarketdb
ports:
- "21543:5432"
volumes:
- ./infra/data/postgres:/var/lib/postgresql/data
restart: always
networks:
- fullstack
foodmarket-pgadmin:
container_name: foodmarket-pgadmin
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:[email protected]}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin}
volumes:
- ./infra/data/pgadmin:/root/.pgadmin
ports:
- "${PGADMIN_PORT:-5051}:80"
networks:
- fullstack
depends_on:
- foodmarket-db
restart: unless-stopped
volumes:
foodmarket-api:
foodmarket-db:
foodmarket-pgadmin:
networks:
fullstack:
driver: bridge