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