Skip to content

Commit

Permalink
Fixed startup issues when Docker container is put down and up
Browse files Browse the repository at this point in the history
  • Loading branch information
ihranicky committed Nov 19, 2023
1 parent 8cdf7ab commit 1f3c7c9
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 20 deletions.
16 changes: 8 additions & 8 deletions docker-compose-custom-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ services:
# When preserved, the entrypoint will attempt to load existing Fitcrack installation
# When deleted, the entrypoint installs a new Fitcrack project

- "mysql:/var/lib/mysql" # MySQL server data directory
- "collections:/usr/share/collections" # Collections of dictionaries, masks, etc.
- "etc:/etc" # Linux system config directory
- "usr:/usr" # Linux system binaries and libraries directory
- "run:/run" # Linux system runtime directory
- "boincadm:/home/boincadm" # BOINC server user home directory
- "apache:/etc/apache2" # Apache config directory
- "apache-conf:/etc/init.d" # Directory with service init scripts
- "mysql:/var/lib/mysql" # MySQL server data directory
- "webadmin-be:/var/www/html/fitcrackAPI" # Fitcrack backend installation
- "webadmin-fe:/var/www/html/fitcrackFE" # Fitcrack frontend installation
- "./fitcrack-data/logs:/var/log/fitcrack" # Log directory (host-mapped!)
Expand All @@ -90,11 +90,11 @@ services:
# using 'docker-compose build' or 'docker-compose build --no-cache'.

volumes:
mysql:
etc:
usr:
run:
boincadm:
collections:
apache:
apache-conf:
mysql:
webadmin-be:
webadmin-fe:
logs:
Expand Down
18 changes: 9 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ services:
# When preserved, the entrypoint will attempt to load existing Fitcrack installation
# When deleted, the entrypoint installs a new Fitcrack project

- "mysql:/var/lib/mysql" # MySQL server data directory
- "collections:/usr/share/collections" # Collections of dictionaries, masks, etc.
- "etc:/etc" # Linux system config directory
- "usr:/usr" # Linux system binaries and libraries directory
- "run:/run" # Linux system runtime directory
- "boincadm:/home/boincadm" # BOINC server user home directory
- "apache:/etc/apache2" # Apache config directory
- "apache-conf:/etc/init.d" # Directory with service init scripts
- "mysql:/var/lib/mysql" # MySQL server data directory
- "webadmin-be:/var/www/html/fitcrackAPI" # Fitcrack backend installation
- "webadmin-fe:/var/www/html/fitcrackFE" # Fitcrack frontend installation
- "./fitcrack-data/logs:/var/log/fitcrack" # Log directory (host-mapped!)
Expand All @@ -81,12 +81,12 @@ services:
# using 'docker-compose build' or 'docker-compose build --no-cache'.

volumes:
mysql:
etc:
usr:
run:
boincadm:
collections:
apache:
apache-conf:
mysql:
webadmin-be:
webadmin-fe:
logs:
certificates:
certificates:
17 changes: 14 additions & 3 deletions tools/entrypoint-fitcrack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -372,13 +372,24 @@ else # Create Fitcrack project

# Restart Apache
service apache2 restart

# All done
echo "All done."
echo "FITCRACK server is ready to use."
fi

#
##############################################

service mysql start
service apache2 start
service fitcrack start
echo "Fitcrack is already installed in this container."
echo "Reviving daemons from the past. Please wait..."

service mysql restart
service apache2 restart
service fitcrack restart

# All done
echo "All done."
echo "FITCRACK server is ready to use."

sleep infinity

0 comments on commit 1f3c7c9

Please sign in to comment.