-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script to initialize volumes and permissions
- Loading branch information
1 parent
b7a4f67
commit 17919c3
Showing
4 changed files
with
97 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/sh | ||
|
||
if [ ! -f docker-compose.yml ]; then | ||
echo "This script needs to be executed from the directory that contains the docker-compose.yml" | ||
exit 1; | ||
fi | ||
|
||
function init_volume() { | ||
directory=${1} | ||
user=${2} | ||
|
||
echo "Creating directory ${directory}" | ||
mkdir -p ${directory} | ||
|
||
echo "Changing owner of directory '${directory}' to '${user}'" | ||
chown ${user} ${directory} | ||
} | ||
|
||
. .env | ||
|
||
init_volume data/faf-db ${FAF_DB_USER} | ||
init_volume data/faf-prometheus ${FAF_PROMETHEUS_USER} | ||
init_volume data/faf-grafana ${FAF_GRAFANA_USER} | ||
init_volume data/faf-wordpress ${FAF_WORDPRESS_USER} | ||
init_volume data/faf-phpbb3 ${FAF_PHPBB3_USER} | ||
init_volume data/faf-mediawiki ${FAF_MEDIAWIKI_USER} | ||
init_volume data/faf-nginx ${FAF_NGINX_USER} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters