-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yaml
56 lines (55 loc) · 1.68 KB
/
docker-compose.yaml
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
version: "3.4"
services:
postgres:
image: kartoza/postgis:16
restart: on-failure
environment:
POSTGRES_USER: whereintheworld
POSTGRES_PASS: whereintheworld
POSTGRES_DBNAME: whereintheworld
ports:
- "5433:5432"
app:
## Uncomment below to use remote image
# image: ghcr.io/posthog/whereintheworld
## or below to use local image
build: .
volumes:
- .:/home/whereintheworld/code
environment:
DB_HOST: postgres
DEBUG: "1"
ALLOWED_HOSTS: "*"
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY: $SOCIAL_AUTH_GOOGLE_OAUTH2_KEY
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET: $SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET
SOCIAL_AUTH_GITHUB_KEY: $SOCIAL_AUTH_GITHUB_KEY
SOCIAL_AUTH_GITHUB_SECRET: $SOCIAL_AUTH_GITHUB_SECRET
MAPS_API_KEY: $MAPS_API_KEY
SUPERDAY: "1"
MULTI_TENANCY: "1"
ports:
- "8000:8000"
- "3000:3000"
links:
- "postgres:postgres"
depends_on:
migrate:
condition: service_completed_successfully
migrate:
build:
context: .
entrypoint: ["sh", "-c"]
command:
- |
echo "Waiting for postgres..."
while ! nc -z postgres 5432; do
sleep 0.1
done
echo "PostgreSQL started"
python manage.py migrate
depends_on:
postgres:
condition: service_started
environment:
DB_HOST: postgres
DEBUG: true