-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
107 lines (100 loc) · 2.75 KB
/
Copy pathdocker-compose.yml
File metadata and controls
107 lines (100 loc) · 2.75 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
x-django: &django
build:
context: ./backend
dockerfile: ./docker/django/Dockerfile
container_name: backend
stdin_open: true
tty: true
depends_on: [postgres, minio]
env_file:
- .env.development.local
ports:
- "8000:8000"
volumes:
- ./backend/src:/app/src
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8000/health" ]
interval: 30s
timeout: 20s
retries: 3
services:
postgres:
container_name: postgres-triplane
image: postgis/postgis:14-3.1
hostname: postgres
ports:
- "5432:5432"
- "5433:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: triplane
POSTGRES_DB: postgres-triplane
USE_GEOS: 1
USE_PROJ: 1
USE_STATS: 1
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD", "pg_isready", "-U", "postgres" ]
interval: 30s
timeout: 20s
retries: 3
minio:
container_name: minio
image: minio/minio:latest
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio_data:/data
environment:
MINIO_ROOT_USER: superuser
MINIO_ROOT_PASSWORD: superuser
command: server /data --console-address ":9001"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ]
interval: 30s
timeout: 20s
retries: 3
minio-create-buckets:
image: minio/mc:latest
entrypoint: >
/bin/sh -c '
mc alias set s3 http://minio:9000 superuser superuser;
mc ls s3/files || mc mb s3/files;
mc anonymous set public s3/files;
exit 0;
'
django:
<<: *django
depends_on: [postgres, minio]
profiles: ["dev"]
localstack:
image: localstack/localstack:latest
container_name: localstack
ports:
- "4566:4566"
environment:
- SERVICES=s3
- DEBUG=1
- DEFAULT_REGION=us-east-1
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4566/health"]
interval: 5s
timeout: 10s
retries: 5
test:
<<: *django
build:
context: ./backend
dockerfile: ./docker/test/Dockerfile
container_name: test
ports:
- "8001:8000"
depends_on: [postgres, localstack]
env_file:
- .env.testing.local
profiles: ["test"]
volumes:
postgres_data:
minio_data: