Skip to content

Commit

Permalink
🐳 🚜 Refactors compose
Browse files Browse the repository at this point in the history
  • Loading branch information
jefftriplett committed Mar 2, 2024
1 parent b9c8408 commit 5c99465
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,6 @@ dmypy.json

# Cython debug symbols
cython_debug/

# Custom compose options
compose.override.yml
8 changes: 8 additions & 0 deletions compose-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -eo pipefail

python manage.py migrate --noinput --skip-checks

python manage.py collectstatic --noinput --skip-checks

exec "$@"
1 change: 1 addition & 0 deletions compose.override.yml → compose.override.yml-dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ services:

db:
platform: linux/amd64
# platform: linux/arm64/v8

utility:
platform: linux/arm64
Expand Down
1 change: 1 addition & 0 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ services:
web:
<<: *common-settings
command: ["python", "-m", "manage", "runserver", "0.0.0.0:8000"]
entrypoint: ["/src/compose-entrypoint.sh"]
init: true
ports:
- "8000:8000"
Expand Down

0 comments on commit 5c99465

Please sign in to comment.