diff --git a/backend/Dockerfile b/backend/Dockerfile index eee8966..6de1067 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -13,7 +13,7 @@ WORKDIR /code # Install system dependencies RUN apt-get update \ - && apt-get install -y git postgresql-client \ + && apt-get install -y git postgresql-client gdal-bin libgdal-dev \ && apt-get clean # Install Python dependencies diff --git a/backend/entrypoint.sh b/backend/entrypoint.sh index 26fc045..269a5aa 100644 --- a/backend/entrypoint.sh +++ b/backend/entrypoint.sh @@ -13,6 +13,9 @@ done >&2 echo "PostgreSQL is up - continuing..." +# run sql commands +# psql -h "$PGHOST" -U "$PGUSER" -d "$PGDATABASE" -f /app/backend/init-postgis.sql + # Apply Django migrations python manage.py migrate diff --git a/backend/init-postgis.sql b/backend/init-postgis.sql new file mode 100644 index 0000000..032f6f9 --- /dev/null +++ b/backend/init-postgis.sql @@ -0,0 +1,2 @@ +CREATE EXTENSION IF NOT EXISTS postgis; +CREATE EXTENSION IF NOT EXISTS postgis_topology; \ No newline at end of file diff --git a/backend/server/worldtravel/management/commands/worldtravel-seed.py b/backend/server/worldtravel/management/commands/worldtravel-seed.py index b63d97f..f7ec9a4 100644 --- a/backend/server/worldtravel/management/commands/worldtravel-seed.py +++ b/backend/server/worldtravel/management/commands/worldtravel-seed.py @@ -19,7 +19,7 @@ def setGeometry(region_code): json_file = os.path.join('static/data', f'{country_code.lower()}.json') if not os.path.exists(json_file): - print(f'File {country_code}.json does not exist') + print(f'File {country_code}.json does not exist (it probably hasn''t been added, contributors are welcome!)') return None try: diff --git a/docker-compose.yml b/docker-compose.yml index 871e5d3..c7d2a4d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,8 +2,8 @@ version: "3.9" services: web: - #build: ./frontend/ - image: ghcr.io/seanmorley15/adventurelog-frontend:latest + build: ./frontend/ + #image: ghcr.io/seanmorley15/adventurelog-frontend:latest environment: - PUBLIC_SERVER_URL=http://server:8000 # MOST DOCKER USERS WILL NEVER NEED TO CHANGE THIS, EVEN IF YOU CHANGE THE PORTS - ORIGIN=http://localhost:8080 @@ -14,7 +14,7 @@ services: - server db: - image: postgres:latest + image: postgis/postgis:15-3.3 environment: POSTGRES_DB: database POSTGRES_USER: adventure @@ -23,8 +23,8 @@ services: - postgres_data:/var/lib/postgresql/data/ server: - #build: ./backend/ - image: ghcr.io/seanmorley15/adventurelog-backend:latest + build: ./backend/ + #image: ghcr.io/seanmorley15/adventurelog-backend:latest environment: - PGHOST=db - PGDATABASE=database diff --git a/frontend/src/routes/settings/+page.svelte b/frontend/src/routes/settings/+page.svelte index b67944f..cb7bd28 100644 --- a/frontend/src/routes/settings/+page.svelte +++ b/frontend/src/routes/settings/+page.svelte @@ -167,22 +167,25 @@ -
This may take a few seconds...
-By selecting this, the server will check all of your visited adventures and mark the regions they are located in as "visited" in world travel.
- Update Visited RegionsThis may take longer depending on the number of adventures you have.
This may take a few seconds...
+