Skip to content

Commit

Permalink
Updated docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
benjackwhite committed Apr 9, 2024
1 parent 72a5cc0 commit 9c733c2
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: "3.4"
services:
postgres:
image: postgis/postgis:14-master
Expand All @@ -10,19 +11,33 @@ services:
- "5433:5432"
app:
build: .
command: python manage.py runserver 0.0.0.0:8000
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
MAPS_API_KEY: $MAPS_API_KEY
ports:
- "8000:8000"
links:
- "postgres:postgres"
- "postgres:postgres"
depends_on:
migrate:
condition: service_completed_successfully

setup:
build: .
migrate:
build:
context: .
entrypoint: ["sh", "-c"]
command:
- python manage.py migrate
depends_on:
postgres:
condition: service_started
environment:
DB_HOST: postgres
command: python manage.py migrate && python manage.py cities --import=all
links:
- "postgres:postgres"
DEBUG: true

0 comments on commit 9c733c2

Please sign in to comment.