Skip to content

Commit

Permalink
fix for s6 scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
johncronan committed Apr 27, 2022
1 parent 405c2fc commit 6325f96
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 9 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ COPY . /opt/services/djangoapp/src
RUN poetry install --no-dev

COPY resources/s6-rc.d /etc/s6-overlay/s6-rc.d
COPY resources/run /opt/services/djangoapp/run

ARG S6_VERSION=3.1.0.1
ARG S6_URL=https://github.com/just-containers/s6-overlay/releases/download
RUN arch="$(dpkg --print-architecture)"; \
Expand All @@ -36,3 +38,4 @@ EXPOSE 8000
ENTRYPOINT ["/init"]

# TODO: change to an app user?
CMD ["/command/with-contenv", "../run"]
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ services:
- .env
environment:
DOCKER_ENV: 'on'
S6_KILL_GRACETIME: 1
volumes:
- requirements_volume:/opt/services/djangoapp/requirements
- static_volume:/opt/services/djangoapp/static
Expand Down
File renamed without changes.
Empty file.
Empty file.
3 changes: 0 additions & 3 deletions resources/s6-rc.d/djangoapp/finish

This file was deleted.

1 change: 0 additions & 1 deletion resources/s6-rc.d/djangoapp/type

This file was deleted.

2 changes: 1 addition & 1 deletion resources/s6-rc.d/setup1/up
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/command/execlineb -P
# execline

cd /opt/services/djangoapp/requirements
foreground { touch requirements.txt }
Expand Down
2 changes: 1 addition & 1 deletion resources/s6-rc.d/setup2/up
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/command/execlineb -P
# execline

cd /opt/services/djangoapp/src
with-contenv
Expand Down
8 changes: 6 additions & 2 deletions resources/s6-rc.d/setup3/up
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/command/execlineb -P
# execline

cd /opt/services/djangoapp/src
# if { test -n $AUTO_MIGRATE } i don't know how
with-contenv
if -t
{
importas -D "" AUTO_MIGRATE AUTO_MIGRATE
test -n ${AUTO_MIGRATE}
}
python3 manage.py migrate --noinput
Empty file.
2 changes: 1 addition & 1 deletion templates/admin/formative/formblock/change_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{% else %}
{% if form_id %}
<a href="{% url 'admin:formative_formblock_formlist' form_id %}">
{% else %}
{% elif original.form %}
<a href="{% url 'admin:formative_formblock_formlist' original.form.id %}">
{% endif %}
{% endif %}
Expand Down

0 comments on commit 6325f96

Please sign in to comment.