Skip to content

Commit

Permalink
Merge pull request #111 from stuartmaxwell:another-typo
Browse files Browse the repository at this point in the history
Final tweaks
  • Loading branch information
stuartmaxwell authored Oct 7, 2024
2 parents 716daab + e3300ec commit bdb9850
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ services:
- "S3_BUCKET=${S3_BUCKET}"
- "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}"
- "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}"
- "AWS_ENDPOINT_URL=${AWS_ENDPOINT_URL}"
- "SECRET_KEY=${SECRET_KEY}"
- "DEBUG=${DEBUG}"
- "ALLOWED_HOSTS=${ALLOWED_HOSTS}"
Expand All @@ -28,3 +29,8 @@ services:
- "SENTRY_ENVIRONMENT=${SENTRY_ENVIRONMENT}"
- "SENTRY_DSN=${SENTRY_DSN}"
- "SENTRY_TRACES_SAMPLE_RATE=${SENTRY_TRACES_SAMPLE_RATE}"
volumes:
- app_data:/app

volumes:
app_data:
8 changes: 1 addition & 7 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# Exit immediately if any command fails
# set -e
set -euf -o pipefail

# Function to download the latest SQLite database backup from S3
download_latest_backup() {
Expand All @@ -17,7 +17,6 @@ download_latest_backup() {
fi
}


if [ "$DB_ENGINE" = "django.db.backends.postgresql" ]
then
echo "Waiting for postgresql..."
Expand All @@ -31,11 +30,6 @@ fi

# Check if the database engine is SQLite and the database file doesn't exist
echo "Checking if SQLite database file exists"
# Print out environment variables
echo "DB_ENGINE: $DB_ENGINE"
echo "DB_NAME: $DB_NAME"
echo "S3_BUCKET: $S3_BUCKET"
echo "AWS_ENDPOINT_URL: $AWS_ENDPOINT_URL"
if [ "$DB_ENGINE" = "django.db.backends.sqlite3" ] && [ ! -f "/app/$DB_NAME.sqlite3" ]; then
download_latest_backup
fi
Expand Down

0 comments on commit bdb9850

Please sign in to comment.