mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-25 12:30:37 +03:00
Fix builds
This commit is contained in:
parent
d888eada82
commit
f29f816a5d
|
@ -44,7 +44,7 @@ services:
|
|||
postgresql-db:
|
||||
container_name: local-portal-db
|
||||
restart: no
|
||||
image: postgres:alpine
|
||||
image: postgres:16-alpine
|
||||
env_file: ./postgresql/.env.prod.local
|
||||
volumes:
|
||||
- postgres_volume:/var/lib/postgresql/data
|
||||
|
|
|
@ -72,7 +72,7 @@ services:
|
|||
postgresql-db:
|
||||
container_name: portal-db
|
||||
restart: always
|
||||
image: postgres:alpine
|
||||
image: postgres:16-alpine
|
||||
secrets:
|
||||
- db_password
|
||||
env_file: ./postgresql/.env.prod
|
||||
|
|
|
@ -12,7 +12,7 @@ function PopulateDevData() {
|
|||
function ImportInitialData() {
|
||||
docker exec `
|
||||
-it $container `
|
||||
python manage.py loaddata $backend\fixtures\InitialData.json
|
||||
python3.12 manage.py loaddata $backend\fixtures\InitialData.json
|
||||
}
|
||||
|
||||
function CreateAdmin() {
|
||||
|
@ -20,7 +20,7 @@ function CreateAdmin() {
|
|||
-e DJANGO_SUPERUSER_USERNAME=admin `
|
||||
-e DJANGO_SUPERUSER_PASSWORD=1234 `
|
||||
-e DJANGO_SUPERUSER_EMAIL=admin@admin.com `
|
||||
-it $container python manage.py createsuperuser --noinput
|
||||
-it $container python3.12 manage.py createsuperuser --noinput
|
||||
}
|
||||
|
||||
PopulateDevData
|
||||
|
|
|
@ -60,7 +60,7 @@ function DjangoDump() {
|
|||
$local_dataDump = "/home/app/web/backup/$_formatDate-data.json"
|
||||
$local_archiveDump = "/home/app/web/backup/$_formatDate-data.json.gz"
|
||||
& docker exec $containerBackend `
|
||||
python manage.py dumpdata `
|
||||
python3.12 manage.py dumpdata `
|
||||
--indent=2 `
|
||||
--exclude=admin.LogEntry `
|
||||
--exclude=sessions `
|
||||
|
|
|
@ -29,7 +29,7 @@ dump_postgre() {
|
|||
dump_django() {
|
||||
DATA_DUMP_FILE="${DESTINATION}/${DATE_FORMATTED}-data.json"
|
||||
docker exec $CONTAINER_BACK \
|
||||
python manage.py dumpdata \
|
||||
python3.12 manage.py dumpdata \
|
||||
--indent=2 \
|
||||
--exclude=admin.LogEntry \
|
||||
--exclude=sessions \
|
||||
|
|
|
@ -7,7 +7,9 @@ git reset --hard origin/main
|
|||
/bin/bash "${BACKUP_SCRIPT}"
|
||||
|
||||
docker compose --file "${COMPOSE_FILE}" up --build --detach
|
||||
docker image prune --all --force
|
||||
|
||||
# Use this to prune caches
|
||||
# docker system prune -a -f
|
||||
|
||||
# Use this command to restart containers if something went wrong
|
||||
# docker compose --file "docker-compose-prod.yml" restart
|
Loading…
Reference in New Issue
Block a user