-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose-ci.yml
83 lines (83 loc) · 2.47 KB
/
docker-compose-ci.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
71
72
73
74
75
76
77
78
79
80
81
82
83
version: '3.9'
services:
testy:
extra_hosts:
- "host.docker.internal:host-gateway"
build:
context: testy
dockerfile: scripts/dev/Dockerfile
volumes:
- './:/testy'
ports:
- "8001:8000"
environment:
- DJANGO_SETTINGS_MODULE=testy.settings.development
- POSTGRES_NAME=${POSTGRES_NAME}
- POSTGRES_USER=${POSTGRES_USERNAME}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_SERVICE_HOST=${POSTGRES_SERVICE_HOST}
- POSTGRES_SERVICE_PORT=${POSTGRES_SERVICE_PORT}
- COMPANY_DOMAIN=${COMPANY_DOMAIN}
- SUPERUSER_USERNAME=${SUPERUSER_USERNAME}
- SUPERUSER_PASSWORD=${SUPERUSER_PASSWORD}
- ALLOWED_HOSTS=${ALLOWED_HOSTS}
- SECRET_KEY=${SECRET_KEY}
- CELERY_BROKER_URL=${CELERY_BROKER_URL}
- CELERY_RESULT_BACKEND=${CELERY_RESULT_BACKEND}
- REDIS_HOST=${REDIS_HOST}
- REDIS_PORT=${REDIS_PORT}
depends_on:
db:
condition: service_healthy
db:
image: postgres:14.5-alpine
volumes:
- ./pg-data:/var/lib/postgresql/data
ports:
- "5435:5432"
environment:
- POSTGRES_USER=${POSTGRES_USERNAME}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_NAME}
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:alpine
command: redis-server --appendonly yes
volumes:
- "./redis_data:/data"
ports:
- "6380:6379"
celery:
extra_hosts:
- "host.docker.internal:host-gateway"
restart: always
build:
context: testy
dockerfile: scripts/dev/celery/Dockerfile
command: celery -A testy worker -l INFO
environment:
- DJANGO_SETTINGS_MODULE=testy.settings.development
- POSTGRES_NAME=${POSTGRES_NAME}
- POSTGRES_USER=${POSTGRES_USERNAME}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_SERVICE_HOST=${POSTGRES_SERVICE_HOST}
- POSTGRES_SERVICE_PORT=${POSTGRES_SERVICE_PORT}
- COMPANY_DOMAIN=${COMPANY_DOMAIN}
- SUPERUSER_USERNAME=${SUPERUSER_USERNAME}
- SUPERUSER_PASSWORD=${SUPERUSER_PASSWORD}
- ALLOWED_HOSTS=${ALLOWED_HOSTS}
- SECRET_KEY=${SECRET_KEY}
- CELERY_BROKER_URL=${CELERY_BROKER_URL}
- CELERY_RESULT_BACKEND=${CELERY_RESULT_BACKEND}
- REDIS_HOST=${REDIS_HOST}
- REDIS_PORT=${REDIS_PORT}
volumes:
- './testy:/testy'
depends_on:
- testy
- db
- redis