faster docker
This commit is contained in:
parent
9a3b6c1e75
commit
acf169edaf
3 changed files with 5 additions and 10 deletions
|
@ -12,17 +12,13 @@ docker volume create c3nav-redis
|
|||
|
||||
# Start only postgres and redis first (no build since we pre-built)
|
||||
docker compose up -d postgres redis
|
||||
sleep 10
|
||||
|
||||
|
||||
sleep 5
|
||||
cat ./db/auth_user.sql | docker exec -i local_run-postgres-1 su - postgres -c 'psql c3nav'
|
||||
|
||||
# Create Django superuser
|
||||
|
||||
sleep 1
|
||||
|
||||
# Load database dump before starting the main app
|
||||
cat ./db/dump.sql | docker exec -i local_run-postgres-1 su - postgres -c 'psql c3nav'
|
||||
cat ./db/dump.sql | docker exec -i local_run-postgres-1 su - postgres -c 'psql c3nav' > /dev/null
|
||||
|
||||
# Fix geometry access permissions for anonymous users
|
||||
docker exec -i local_run-postgres-1 psql -U postgres -d c3nav -c "UPDATE mapdata_space SET base_mapdata_accessible = true;"
|
||||
|
@ -38,7 +34,6 @@ user.set_password('admin')
|
|||
user.save()
|
||||
print('Password set successfully for user:', user.username)
|
||||
\" | /app/env/bin/python manage.py shell"
|
||||
sleep 30
|
||||
|
||||
|
||||
# Fake apply all migrations since we loaded from dump
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue