-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
47 lines (44 loc) · 921 Bytes
/
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
version: '3.0'
services:
db:
container_name: db
image: postgres:12
ports:
- "5432:5432"
env_file:
- .env
networks:
- postgres_network
pgadmin:
container_name: pgadmin
image: dpage/pgadmin4
env_file:
- .env
ports:
- "16543:80"
networks:
- postgres_network
depends_on:
- db
api:
# name of container
container_name: api
# path where dockerfile is
build: ./api/
# start running
command: python app.py
# set app ports
ports:
- "5000:5000"
# sync local files to container | same_path_on_build:workdir_on_dockerfile
volumes:
- ./api/:/usr/src/project/api # change {project} for your project's name
# set environment variables
env_file:
- .env
# connect to another container
networks:
- postgres_network
networks:
postgres_network:
driver: bridge