This repository has been archived by the owner on Jan 14, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose-web.yml
70 lines (64 loc) · 1.63 KB
/
docker-compose-web.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
61
62
63
64
65
66
67
68
69
70
version: "3"
networks:
origin-website-develop:
volumes:
pg_data_web:
services:
postgres_web:
image: postgres:10.0
container_name: postgres_web
restart: always
# Data persistence, comment out the following two lines to disable
volumes:
- pg_data_web:/var/lib/postgresql/data
environment:
- POSTGRES_USER=origin
- POSTGRES_PASSWORD=origin
- POSTGRES_DB=origin_website
networks:
- origin-website-develop
redis_web:
image: redis
container_name: redis_web
restart: always
sysctls:
- net.core.somaxconn=4096
networks:
- origin-website-develop
origin-website:
container_name: origin-website
build:
context: .
dockerfile: dockerfiles/origin-website
image: origin-website
volumes:
- ./origin-website:/app
# Set the envfile from the local envfile
- ./envfiles/origin-website.env:/app/.env
depends_on:
- postgres_web
- redis_web
ports:
- "5000:5000"
environment:
- FLASK_APP=/app/main.py
command: "python /app/main.py"
networks:
- origin-website-develop
origin-website-celery:
container_name: origin-website-celery
image: origin-website
user: nobody
depends_on:
- postgres_web
- redis_web
volumes:
- ./origin-website:/app
# Set the envfile from the local envfile
- ./envfiles/origin-website.env:/app/.env
environment:
- FLASK_APP=/app/main.py
command: "watchmedo auto-restart -d . -p '*.py' -i '*.pyc' --recursive --
celery -A util.tasks worker --loglevel=INFO"
networks:
- origin-website-develop