forked from wevote/WeVoteServer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
80 lines (74 loc) · 2.21 KB
/
compose.yaml
File metadata and controls
80 lines (74 loc) · 2.21 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
name: wevote
services:
db:
environment:
- POSTGRES_USER=${DATABASE_USER:-postgres}
- POSTGRES_DB=${DATABASE_NAME:-wevoteserverdb}
- POSTGRES_PASSWORD=${DATABASE_PASSWORD}
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
image: postgres:16-alpine
networks:
- wevote
ports:
- "127.0.0.1:5432:5432" # to allow postgres clients on the host machine to connect to the database at localhost:5432
user: postgres
volumes:
- postgres_data:/var/lib/postgresql/data
localstack:
image: localstack/localstack:4.14.0
networks:
- wevote
volumes:
- localstack:/var/lib/localstack
- ./docker/dev/localstack-init.sh:/etc/localstack/init/ready.d/init.sh
environment:
PERSISTENCE: 1
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4566/_localstack/health"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
api:
build:
dockerfile: docker/Dockerfile.dev
depends_on:
db:
condition: service_healthy
localstack:
condition: service_healthy
environment:
- DATABASE_NAME=${DATABASE_NAME:-wevoteserverdb}
- DATABASE_NAME_READONLY=${DATABASE_NAME:-wevoteserverdb}
- DATABASE_HOST=db
- DATABASE_HOST_READONLY=db
- DATABASE_USER=${DATABASE_USER:-postgres}
- DATABASE_USER_READONLY=${DATABASE_USER:-postgres}
- DATABASE_PASSWORD=${DATABASE_PASSWORD:-admin}
- DATABASE_PASSWORD_READONLY=${DATABASE_PASSWORD:-admin}
- DATABASE_PORT=${DATABASE_PORT:-5432}
- DATABASE_PORT_READONLY=${DATABASE_PORT:-5432}
- DJANGO_SUPERUSER_EMAIL
- DJANGO_SUPERUSER_PASSWORD
- AWS_ENDPOINT_URL=http://localstack:4566
- AWS_ACCESS_KEY_ID=test
- AWS_SECRET_ACCESS_KEY=test
- AWS_DEFAULT_REGION=us-east-1
- AWS_SQS_WEB_QUEUE_URL=http://localstack:4566/000000000000/job-queue.fifo
volumes:
- .:/wevote/code
networks:
- wevote
ports:
- "127.0.0.1:8000:8000" # this allows access to the WeVote API at localhost:8000
networks:
wevote:
name: wevote
external: true
volumes:
localstack:
postgres_data: