Remove sudo from reinitialisation. Make db non persistent.

This commit is contained in:
Jan Eitzinger 2021-09-19 07:30:55 +02:00
parent 086d363b7b
commit 540c23ce87
2 changed files with 3 additions and 4 deletions

View File

@ -2,12 +2,12 @@
if [ -d symfony ]; then if [ -d symfony ]; then
echo "Data already initialized!" echo "Data already initialized!"
echo -n "Perform a fresh initialisation? Answer yes to proceed and no to exit. " echo -n "Perform a fresh initialisation? [yes to proceed / no to exit] "
read -r answer read -r answer
if [ "$answer" == "yes" ]; then if [ "$answer" == "yes" ]; then
echo "Cleaning directories ..." echo "Cleaning directories ..."
rm -rf symfony rm -rf symfony
sudo rm -rf job-archive rm -rf job-archive
rm -rf influxdb/data/* rm -rf influxdb/data/*
rm -rf sqldata/* rm -rf sqldata/*
echo "done." echo "done."

View File

@ -10,7 +10,7 @@ services:
MYSQL_PASSWORD: ${MYSQL_PASSWORD} MYSQL_PASSWORD: ${MYSQL_PASSWORD}
volumes: volumes:
- ${DATADIR}/sql-init:/docker-entrypoint-initdb.d - ${DATADIR}/sql-init:/docker-entrypoint-initdb.d
- ${DATADIR}/sqldata:/var/lib/mysql # - ${DATADIR}/sqldata:/var/lib/mysql
cap_add: cap_add:
- SYS_NICE - SYS_NICE
@ -105,4 +105,3 @@ services:
- PMA_PASSWORD=${MYSQL_ROOT_PASSWORD} - PMA_PASSWORD=${MYSQL_ROOT_PASSWORD}
ports: ports:
- "127.0.0.1:${PHPMYADMIN_PORT}:80" - "127.0.0.1:${PHPMYADMIN_PORT}:80"
restart: always