-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.dev.yml
66 lines (64 loc) · 1.87 KB
/
docker-compose.dev.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
name: pyronear
services:
db:
image: postgres:15-alpine
expose:
- 5432
environment:
- POSTGRES_USER=dummy_pg_user
- POSTGRES_PASSWORD=dummy_pg_pwd
- POSTGRES_DB=dummy_pg_db
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready -U dummy_pg_user -d dummy_pg_db'"]
interval: 10s
timeout: 3s
retries: 3
# ref link: https://github.com/localstack/localstack/blob/master/docker-compose.yml
localstack:
image: localstack/localstack:1.4.0
ports:
- 4566:4566
# environment variables details: https://docs.localstack.cloud/references/configuration/
environment:
- EDGE_PORT=4566
- SERVICES=s3
volumes:
- ./scripts/localstack:/etc/localstack/init/ready.d
healthcheck:
test: ["CMD-SHELL", "awslocal --endpoint-url=http://localhost:4566 s3 ls s3://admin"]
interval: 10s
timeout: 5s
retries: 10
backend:
build:
context: .
dockerfile: ./src/Dockerfile
depends_on:
db:
condition: service_healthy
localstack:
condition: service_healthy
ports:
- "5050:5050"
environment:
- POSTGRES_URL=postgresql+asyncpg://dummy_pg_user:dummy_pg_pwd@db/dummy_pg_db
- SUPERADMIN_LOGIN=superadmin_login
- SUPERADMIN_PWD=superadmin_pwd
- SUPERADMIN_ORG=admin
- JWT_SECRET=${JWT_SECRET}
- SUPPORT_EMAIL=${SUPPORT_EMAIL}
- DEBUG=true
- SQLALCHEMY_SILENCE_UBER_WARNING=1
- S3_ENDPOINT_URL=http://localstack:4566
- S3_ACCESS_KEY=fake
- S3_SECRET_KEY=fake
- S3_REGION=us-east-1
volumes:
- ./src/:/app/
command: "sh -c 'python app/db.py && uvicorn app.main:app --reload --host 0.0.0.0 --port 5050 --proxy-headers'"
restart: always
healthcheck:
test: ["CMD-SHELL", "curl http://localhost:5050/status"]
interval: 10s
timeout: 3s
retries: 3