-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
91 lines (90 loc) · 2.18 KB
/
docker-compose.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
84
85
86
87
88
89
90
91
# This is for local development only.
# DO NOT deploy this on a production server!
version: '3'
services:
web:
build:
context: ./hdrop-web-next
dockerfile: Dockerfile.development
ports:
- "3000:3000"
networks:
- hdrop
environment:
- CHOKIDAR_USEPOLLING=true
- REACT_APP_BASE_URL=http://localhost:3000
- REACT_APP_API_ENDPOINT=http://localhost:8080
volumes:
- ./hdrop-web-next:/app
- /app/node_modules
api:
build:
context: .
dockerfile: ./hdrop-server/Dockerfile
ports:
- "8080:80"
networks:
- hdrop
- backend
environment:
- HDROP_PORT=80
- PROMETHEUS_PORT=3001
- STORAGE_PROVIDER=s3
- S3_ACCESS_KEY_ID=dev
- S3_SECRET_ACCESS_KEY=dev
- S3_REGION=eu-west-1
- S3_ENDPOINT=http://localstack:4566
- S3_BUCKET_NAME=hdrop
- S3_PUBLIC_URL=http://localhost:4566/hdrop
- CORS_ORIGIN=*
- CACHE_STRATEGY=memory
- CACHE_MEMORY_LIMIT_MB=2000
- SINGLE_FILE_LIMIT_MB=500
- DATABASE_URL=postgres://postgres:postgres@postgres:5432/hdrop
depends_on:
- postgres
- localstack
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/status"]
localstack:
image: localstack/localstack:latest
ports:
- "4566:4566"
- "4567:4567"
networks:
- hdrop
- backend
environment:
- DEBUG=1
- SERVICES=s3
- AWS_ACCESS_KEY_ID=dev
- AWS_SECRET_ACCESS_KEY=dev
- AWS_DEFAULT_REGION=eu-west-1
- SKIP_SSL_CERT_DOWNLOAD=1
- EDGE_BIND_HOST=0.0.0.0
- EXTRA_CORS_ALLOWED_ORIGINS=*
volumes:
- ./aws:/etc/localstack/init/ready.d
healthcheck:
test: ["CMD", "awslocal", "s3api", "wait", "bucket-exists", "--bucket", "hdrop"]
postgres:
image: postgres:15-alpine
ports:
- "5432:5432"
networks:
- backend
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=hdrop
prometheus:
image: prom/prometheus:latest
ports:
- "9090:9090"
networks:
- backend
volumes:
- ./prometheus:/etc/prometheus
networks:
hdrop:
backend: