add alias to run full import into docker-compose specified PostgreSQL

This commit is contained in:
Michael Hoennig 2024-08-10 07:59:21 +02:00
parent 6ddecbbfec
commit f96db4bb14
2 changed files with 15 additions and 1 deletions

View File

@ -84,3 +84,9 @@ alias fp='grep -r '@Accepts' src | sed -e 's/^.*@/@/g' | sort -u | wc -l'
alias gw-spotless='./gradlew spotlessApply -x pitest -x test -x :processResources' alias gw-spotless='./gradlew spotlessApply -x pitest -x test -x :processResources'
alias gw-test='. .aliases; ./gradlew test importOfficeData' alias gw-test='. .aliases; ./gradlew test importOfficeData'
alias gw-check='. .aliases; gw test importOfficeData check -x pitest -x :dependencyCheckAnalyze' alias gw-check='. .aliases; gw test importOfficeData check -x pitest -x :dependencyCheckAnalyze'
# etc/docker-compose.yml limits CPUs+MEM and includes a PostgreSQL config for analysing slow queries
alias gw-importOfficeData-in-docker-compose='
docker-compose -f etc/docker-compose.yml down &&
docker-compose -f etc/docker-compose.yml up -d && sleep 10 &&
time gw-importHostingAssets'

View File

@ -7,7 +7,7 @@ services:
environment: environment:
POSTGRES_PASSWORD: password POSTGRES_PASSWORD: password
volumes: volumes:
- /home/mi/Projekte/Hostsharing/hsadmin-ng/etc/postgresql-log-slow-queries.conf:/etc/postgresql/postgresql.conf - ./postgresql-log-slow-queries.conf:/etc/postgresql/postgresql.conf
ports: ports:
- "5432:5432" - "5432:5432"
command: command:
@ -17,3 +17,11 @@ services:
apt-get update && apt-get update &&
apt-get install -y postgresql-contrib && apt-get install -y postgresql-contrib &&
docker-entrypoint.sh postgres -c config_file=/etc/postgresql/postgresql.conf docker-entrypoint.sh postgres -c config_file=/etc/postgresql/postgresql.conf
deploy:
resources:
limits:
cpus: '4'
memory: 4G
reservations:
cpus: '2'
memory: 2G