-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
60 lines (55 loc) · 1.89 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
58
59
60
version: "3.7"
services:
defect-api-service:
# build the container, looking into the Dockerfile at the bellow relative path
build: ./flask_api
container_name: flask_api
image: flask_api:v1-phil
restart: always
# A place for us to define environment variables for the container
environment:
- PYTHONUNBUFFERED=1 # stdout not buffered
- APP_NAME=MyFlaskApi
- MEDIA_FOLDER=/api/api/media
volumes:
- media_volume:/api/api/media:rw
# Exposes internal ports to other containers and services on the same network
expose:
- 9090
web_app:
# build the container, looking into the Dockerfile at the bellow relative path
build: ./flask_app
container_name: flask_app
image: flask_app:v0-p
restart: always
# A place for us to define environment variables for the container
environment:
- APP_NAME=MyFlaskApp
- STATIC_FOLDER=/app/app/static
- MEDIA_FOLDER=/app/app/media
volumes:
- static_volume:/app/app/static:ro
- media_volume:/app/app/media:rw
# Exposes internal ports to other containers and services on the same network
expose:
- 8080
# declare service dependencies
depends_on:
- defect-api-service
http_server:
build: ./http_server
container_name: http_server
image: http_server:v0-guk
restart: always
volumes:
- static_volume:/home/web_app/static:ro
- media_volume:/home/web_app/media:ro
# expose ports to the outside world,
# mappes port 80 on the host machine to port 80 of our Nginx container.
ports:
- "80:2020"
depends_on:
- web_app
volumes:
static_volume:
media_volume: