-
Notifications
You must be signed in to change notification settings - Fork 0
/
staging.yml
56 lines (50 loc) · 1.09 KB
/
staging.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
version: "3.3"
services:
django: &django
command: python3 -m gunicorn --bind 0.0.0.0:80 app.wsgi:application
depends_on:
db_migration:
condition: service_completed_successfully
build:
context: .
dockerfile: infra/app/Dockerfile
volumes:
- staticfiles:/app/storage/static
- mediafiles:/app/storage/media
- translations:/app/locale
ports:
- 80
env_file:
- .env
environment:
REDIS_HOST: redis
SQL_HOST: db
VIRTUAL_HOST: ${HOST}
LETSENCRYPT_HOST: ${HOST}
networks:
- shared
db_migration:
<<: *django
command: python manage.py migrate
entrypoint: ["sh", "/app/before_migrate.sh"]
ports: []
depends_on: []
celery-scheduler:
<<: *django
command: python -m celery -A app beat
ports: []
celery-worker:
<<: *django
command: python -m celery -A app worker --events
ports: []
volumes:
staticfiles:
external: true
name: staticfiles
translations:
mediafiles:
external: true
name: mediafiles
networks:
shared:
external: true