-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.yml
54 lines (52 loc) · 1.21 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
version: "3"
services:
app:
container_name: go_social
build:
dockerfile: Dockerfile
context: .
ports:
- 8080:8080
# restart: on-failure
# volumes:
# - .:/go/src/go-social-network/
# working_dir: /go/src/go-social-network/
# command: ls
depends_on:
- db # Uncomment this when using postgres.
networks:
- fullstack
db:
image: postgres:latest
container_name: db_postgres
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASS}
- POSTGRES_DB=${DB_NAME}
- DATABASE_HOST=${DB_HOST}
ports:
- "5432:5432"
volumes:
- database_postgres:/var/lib/postgresql/data
networks:
- fullstack
pgadmin:
image: dpage/pgadmin4
container_name: pgadmin_container
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
depends_on:
- db
ports:
- "5050:80"
networks:
- fullstack
restart: unless-stopped
volumes:
api:
database_postgres: # Uncomment this when using postgres.
# Networks to be created to facilitate communication between containers
networks:
fullstack:
driver: bridge