fix: deploy script

This commit is contained in:
Urko. 2023-12-25 11:49:20 +01:00
parent e98dddda19
commit 6e6bc56d6b
1 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
cd /var/www/owncloud
# Check if .env file exists # Check if .env file exists
if [ ! -f .env ]; then if [ ! -f .env ]; then
echo "Error: .env file not found in /var/www/owncloud" echo "Error: .env file not found in /var/www/owncloud"
@ -7,8 +9,8 @@ if [ ! -f .env ]; then
fi fi
# Create network if it doesn't exist # Create network if it doesn't exist
if ! docker network ls | grep -q 'web '; then if ! docker network ls | grep -q 'ocis-net'; then
docker network create --driver=overlay web docker network create --driver=overlay ocis-net
fi fi
# Automatically export all variables from .env file # Automatically export all variables from .env file