-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose-dev.yml
51 lines (48 loc) · 1.23 KB
/
docker-compose-dev.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
version: "3.7"
services:
flask:
build:
context: ./flask
dockerfile: Dockerfile-dev
container_name: flask
environment:
- APP_NAME=FlaskApp
- FLASK_APP=main.py
- FLASK_ENV=testing
- FLASK_DEBUG=true
- SECRET_KEY='SOME RANDOM FOR DEVELOPMENT AND TESTING'
# CELERY_RDB_HOST default is localhost
# to allow RDB able to be connected outside the container CELERY_RDB_HOST
# is needed to be something else rather than localhost
- CELERY_RDB_HOST=0.0.0.0
ports:
# default debugging port of celery 4.4.7 is 6900 according to official
# doc, however the port differs very often and CELERY_RDB_PORT does not
# take effect.
#
# in my case it is usally 6906, and then 6907
- "6900-6910:6900-6910"
- "5555:5555"
expose:
- 8080
depends_on:
- redis
volumes:
- ./flask:/app
entrypoint: /docker-entrypoint.sh
command: uwsgi app.ini
nginx:
build:
context: ./nginx
dockerfile: Dockerfile-dev
container_name: nginx
# restart: always
ports:
- "80:80"
depends_on:
- flask
redis:
image: "redis:alpine"
container_name: redis_article
expose:
- 6379