-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdeploy.sh
More file actions
21 lines (16 loc) · 852 Bytes
/
Copy pathdeploy.sh
File metadata and controls
21 lines (16 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
# This script automates the deployment process by handling environment files and starting Docker services.
# 1. Remove the existing .env.example file to ensure a clean slate.
echo "Removing the old .env.production file..."
rm .env
rm .env.production
# 2. Copy the good.env file to .env.example.
# This ensures that the production environment variables are correctly configured for the build.
echo "Copying good.env to .env.production..."
cp good.env .env
cp good.env .env.production
# 3. Start the Docker Compose services in detached mode (-d) using the production configuration.
# The --build flag forces a rebuild of the images, ensuring any changes are included.
echo "Starting Docker Compose services with the production configuration..."
docker compose -f docker-compose.prod.yml up --build -d
echo "Deployment process complete."