diff --git a/Dockerfile b/Dockerfile index da7c3002dd8d7a9a3935ccd8fd9717228ad4cc74..982ca9acfa4a13be5d6ffd4d5561c2ecd4faef2b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,7 +38,7 @@ RUN pip install "poetry==$POETRY_VERSION"; \ poetry build && /srv/venv/bin/pip install dist/*.whl # Build messages and assets -RUN mkdir /srv/media /srv/static /var/backups/biscuit; \ +RUN mkdir /etc/biscuit /srv/media /srv/static /var/backups/biscuit; \ /srv/venv/bin/python manage.py compilemessages; \ /srv/venv/bin/python manage.py collectstatic --no-input --clear @@ -53,5 +53,9 @@ RUN apt-get remove --purge -y \ apt-get clean -y; \ rm -f /var/lib/apt/lists/*_* +# Mark /etc/biscuit as coming from the host +VOLUME /etc/biscuit + +# Define entrypoint and gunicorn running on port 8000 EXPOSE 8000 ENTRYPOINT ["/usr/src/app/BiscuIT-ng/docker/entrypoint.sh"] diff --git a/docker-compose.yaml b/docker-compose.yaml index 337818ab8d855aa8017f0dbdb543b00cc8a8e152..1677dcfc6a2a0061f77fb6f19183125fe33235f0 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -16,6 +16,7 @@ services: - biscuit_media:/srv/media - biscuit_static:/srv/static - biscuit_backups:/var/backups/biscuit + - biscuit_config:/etc/biscuit environment: - BISCUIT_secret_key=DoNotUseInProduction - BISCUIT_http__allowed_hosts="['*']" @@ -39,3 +40,4 @@ volumes: biscuit_media: biscuit_static: biscuit_backups: + biscuit_config: