server-origin/start.sh
2024-06-25 11:00:22 +05:00

29 lines
627 B
Bash

#!/bin/bash
set -e
if [ -z "$1" ]; then
echo "Please provide the environment type as an argument"
exit 1
fi
ENV_TYPE="$1" # dev / prod
echo "Start server on environment $ENV_TYPE..."
#Traefik run:
sudo docker compose --env-file .env.$ENV_TYPE -f traefik.yml up -d
#Gitea run:
sudo docker compose --env-file .env.$ENV_TYPE -f gitea.yml up -d
#Postgres run:
sudo docker compose -f postgres.yml up -d
#Pgadmin run:
sudo docker compose --env-file .env.$ENV_TYPE -f pgadmin.yml up -d
#Nginx run:
sudo docker compose --env-file .env.$ENV_TYPE -f nginx.yml up -d
echo "All successfully started to environment $ENV_TYPE."