-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update Dockerfile * retrieve docker-compose file from other branch * wip on docker-compose file * local init script * Example docker-composition * Remove dotenv * Envvar for ADMIN_USERNAME * chore: setup docker compose dev environment * chore: improve fixtures generation to be compatible with initialized DBs * chore: missing import gettext_lazy import * chore(Dockerfile): remove /mnt/geoshop_data directory creation --------- Co-authored-by: Andrea Borghi <[email protected]>
- Loading branch information
Showing
6 changed files
with
113 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ ROOTURL= | |
|
||
DEFAULT_FROM_EMAIL=[email protected] | ||
EMAIL_HOST=smtp.example.com | ||
ADMIN_USERNAME=admin | ||
ADMIN_EMAIL_LIST=[email protected] | ||
|
||
# This is used for CORS and to generate links in email templates | ||
|
@@ -45,3 +46,6 @@ DEFAULT_LANGUAGE=en | |
#GDAL_PATH="C:\Applications\Mapserver72_x64\bin" | ||
#GDAL_LIBRARY_PATH="C:\Applications\Mapserver72_x64\bin\gdal300.dll" | ||
#GEOS_LIBRARY_PATH="C:\Applications\Mapserver72_x64\bin\geos_c.dll" | ||
|
||
# Geometric settings | ||
DEFAULT_SRID=2056 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
version: "3" | ||
|
||
networks: | ||
geoshop: | ||
driver: bridge | ||
|
||
services: | ||
db: | ||
image: postgis/postgis:15-3.4-alpine | ||
volumes: | ||
- "./resources/db:/docker-entrypoint-initdb.d:ro" | ||
environment: | ||
POSTGRES_USER: "${PGUSER}" | ||
POSTGRES_PASSWORD: "${PGPASSWORD}" | ||
POSTGRES_DB: "${PGDATABASE}" | ||
LANG: "en_US.utf8" | ||
LC_COLLATE: "en_US.utf8" | ||
LC_CTYPE: "en_US.utf8" | ||
env_file: .env | ||
ports: | ||
- 5432:5432 | ||
networks: | ||
- geoshop | ||
healthcheck: | ||
test: | ||
["CMD-SHELL", "pg_isready -h 127.0.0.1 -U ${PGUSER} -d ${PGDATABASE}"] | ||
interval: 10s | ||
timeout: 5s | ||
retries: 5 | ||
|
||
migrate: | ||
image: geoshop-api | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
depends_on: | ||
db: | ||
condition: service_healthy | ||
env_file: .env | ||
environment: | ||
PGHOST: "db" | ||
command: | ||
- bash | ||
- -c | ||
- "python manage.py migrate && python manage.py collectstatic --noinput && python manage.py compilemessages --locale=fr && python manage.py fixturize" | ||
volumes: | ||
- "static-files:/app/geoshop_back/static:rw" | ||
networks: | ||
- geoshop | ||
|
||
api: | ||
image: geoshop-api | ||
depends_on: | ||
db: | ||
condition: service_healthy | ||
migrate: | ||
condition: service_completed_successfully | ||
env_file: .env | ||
environment: | ||
PGHOST: "db" | ||
command: "gunicorn wsgi -b :8000 --timeout 90" | ||
restart: unless-stopped | ||
volumes: | ||
- "static-files:/app/geoshop_back/static:ro" | ||
ports: | ||
- "8080:8000" | ||
networks: | ||
- geoshop | ||
|
||
volumes: | ||
static-files: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
CREATE EXTENSION IF NOT EXISTS postgis; | ||
CREATE EXTENSION IF NOT EXISTS unaccent; | ||
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; | ||
|
||
CREATE SCHEMA IF NOT EXISTS geoshop AUTHORIZATION geoshop; | ||
|
||
DROP TEXT SEARCH CONFIGURATION IF EXISTS fr; | ||
CREATE TEXT SEARCH CONFIGURATION fr (COPY = simple); | ||
|
||
ALTER TEXT SEARCH CONFIGURATION fr ALTER MAPPING FOR hword, hword_part, word | ||
WITH unaccent, simple; |