-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
85 lines (81 loc) · 2.19 KB
/
docker-compose.yml
File metadata and controls
85 lines (81 loc) · 2.19 KB
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
version: '3'
name: ynr-dev
volumes:
psql-data:
services:
frontend:
<<: &service_defaults
image: ynr:test
env_file:
- path: .env
required: false
volumes:
- ./ynr/:/dc/ynr/code/ynr/
- ./data/:/dc/ynr/code/data/
- ./manage.py:/dc/ynr/code/manage.py
- ./scripts/:/dc/ynr/code/scripts/
- ./gulpfile.js:/dc/ynr/code/gulpfile.js
- ./package.json:/dc/ynr/code/package.json
- ./package-lock.json:/dc/ynr/code/package-lock.json
- ./pyproject.toml:/dc/ynr/code/pyproject.toml
- ./uv.lock:/dc/ynr/code/uv.lock
depends_on:
dbpsql:
condition: service_healthy
pull_policy: never
build:
dockerfile: container/build/Containerfile
# Context is relative to this docker-compose.yml file.
context: .
target: test
command: [
# Watch for updates to files
'watchmedo',
'auto-restart',
'--directory=/dc/ynr/code/ynr',
'--patterns', '*.py;*.html;*.csv;*.json;*.md;*.txt',
'--recursive',
'--',
# Whilst runnning gunicorn
'gunicorn',
'--log-level', 'DEBUG',
'--log-file', '-',
'--error-logfile', '-',
'--access-logfile','-',
'ynr.wsgi',
]
ports:
- "8080:80"
worker:
<<: *service_defaults
command: [
# Watch for updates to python files
'watchmedo',
'auto-restart',
'--directory=/dc/ynr/code/ynr',
'--patterns=*.py',
'--recursive',
'--',
# Whilst runnning django-q worker
'python',
'manage.py',
'qcluster',
]
dbpsql:
image: public.ecr.aws/docker/library/postgres:16.4
pull_policy: missing
environment:
POSTGRES_DB: ynr
POSTGRES_USER: ynr
# This is completely insecure: all connections are trusted, without a password.
POSTGRES_HOST_AUTH_METHOD: trust
volumes:
- psql-data:/var/lib/postgresql/data
ports:
- 54321:5432
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}" ]
interval: 30s
timeout: 60s
retries: 5
start_period: 80s