Skip to content

Commit

Permalink
🐳 Made sure the quickstart works.
Browse files Browse the repository at this point in the history
  • Loading branch information
joeribekker committed May 22, 2024
1 parent cffe287 commit 6383a97
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ ENV RELEASE=${RELEASE} \
ARG SECRET_KEY=dummy

LABEL org.label-schema.vcs-ref=$COMMIT_HASH \
org.label-schema.vcs-url="https://bitbucket.org/maykinmedia/referentielijsten" \
org.label-schema.vcs-url="https://github.com/maykinmedia/referentielijsten" \
org.label-schema.version=$RELEASE \
org.label-schema.name="referentielijsten"

Expand Down
12 changes: 9 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ version: '3'
services:
db:
# NOTE: No persistance storage configured.
# Using v14 to prevent schema permissions. See also docker-init-db.sql.
# See: https://hub.docker.com/_/postgres/
image: postgres
# NOTE: this works for bitnami, not sure if this works for regular
# postgres image
image: postgres:${PG_VERSION:-14}
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
volumes:
- ./docker-init-db.sql:/docker-entrypoint-initdb.d/init_db.sql

Expand All @@ -17,6 +18,11 @@ services:
environment:
- DJANGO_SETTINGS_MODULE=referentielijsten.conf.docker
- SECRET_KEY=${SECRET_KEY:-django-insecure-4foe-_dk9x=88*0sljyo1_ga!!nj*x8ye6u0p(@871e)zg^+q}
- DB_NAME=referentielijsten
- DB_USER=referentielijsten
- DB_HOST=db
# Only allow all hosts for development/testing purposes!
- ALLOWED_HOSTS=*
ports:
- 8000:8000
depends_on:
Expand Down
3 changes: 2 additions & 1 deletion docker-init-db.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
CREATE USER referentielijsten;
CREATE DATABASE referentielijsten;
GRANT ALL PRIVILEGES ON DATABASE referentielijsten TO referentielijsten;

-- On Postgres 15+, connect to the database and grant schema permissions.
-- GRANT USAGE, CREATE ON SCHEMA public TO openforms;

0 comments on commit 6383a97

Please sign in to comment.