forked from IgrowkerTraining/i004-voltix-back
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yaml
89 lines (86 loc) · 2.24 KB
/
docker-compose.dev.yaml
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
services:
voltix_db:
image: postgres:15.1-alpine
restart: always
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DATABASE_PASSWORD}
- POSTGRES_DB=${DB_NAME}
- PGUSER=${DB_USER}
volumes:
- pgdata:/var/lib/postgresql/data/
ports:
- "5435:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-d", "${DB_NAME}"]
interval: 30s
timeout: 60s
retries: 5
start_period: 80s
networks:
- voltix
voltix-back:
build:
context: .
image: igrowker/i004-voltix-back
restart: always
environment:
- DJANGO_SUPERUSER_USERNAME=${DJ_USERNAME}
- DJANGO_SUPERUSER_PASSWORD=${DJ_PASSWORD}
- DJANGO_SUPERUSER_EMAIL=${DJ_EMAIL}
- DNI=${DNI}
- DB_NAME=${DB_NAME}
- DB_HOST=${DB_HOST}
- DB_PORT=${DB_PORT}
- DB_USER=${DB_USER}
- CELERY_BROKER_URL=${CELERY_BROKER_URL}
- CELERY_RESULT_BACKEND=${CELERY_RESULT_BACKEND}
- DATABASE_PASSWORD=${DATABASE_PASSWORD}
- SECRET_KEY=${SECRET_KEY}
- CORS_ALLOW_ALL_ORIGINS=${CORS_ALLOW_ALL_ORIGINS}
- CSRF_TRUSTED_ORIGINS=${CSRF_TRUSTED_ORIGINS}
- USE_DRF_SETTINGS=${USE_DRF_SETTINGS}
- DEBUG=${DEBUG}
- CLOUDINARY_API_SECRET=${CLOUDINARY_API_SECRET}
- CLOUDINARY_CLOUD_NAME=${CLOUDINARY_CLOUD_NAME}
- CLOUDINARY_API_KEY=${CLOUDINARY_API_KEY}
- BACKEND_URL=${BACKEND_URL}
- DB_SCHEMA=${DB_SCHEMA}
working_dir: /usr/share/app
depends_on:
redis-voltix:
condition: service_started
voltix_db:
condition: service_healthy
volumes:
- ./facturas:/tmp
- static:/usr/share/app/static
networks:
- voltix
voltix-back-proxy:
container_name: voltix-back-proxy
image: nginx
restart: always
ports:
- "80:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/my_ginx.conf:/etc/nginx/sites-available/my_ginx.conf
- static:/app/static
depends_on:
- voltix-back
networks:
- voltix
redis-voltix:
image: redis:alpine
restart: always
ports:
- "6379:6379"
networks:
- voltix
volumes:
pgdata:
static:
networks:
voltix:
name: voltix