Refactored the application's dockerization and added new services
This commit involves significant changes to the application's infrastructure. It refactors the application into two separate services: 'nibiru-auth-api' and 'nibiru-webhook-receiver'. Each service has its corresponding Dockerfile, Nginx & PHP-FPM configuration. It also provides a separate Nginx configuration for handling requests for each service. New environment files, start and stop scripts are introduced to facilitate local and production deployments.
This commit is contained in:
26
start.sh
Executable file
26
start.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check for the environment parameter
|
||||
if [ "$1" = "local" ]; then
|
||||
# Use the .env-local file for local development
|
||||
ENV_FILE=".env-local"
|
||||
|
||||
# Export the variables from the specified environment file
|
||||
export $(grep -v '^#' $ENV_FILE | xargs)
|
||||
|
||||
# Use the specified environment file with docker-compose
|
||||
COMPOSE_FILES="-f docker-compose.yml -f docker-compose.local.yml"
|
||||
else
|
||||
# Use the .env file for production
|
||||
ENV_FILE=".env"
|
||||
|
||||
# Export the variables from the specified environment file
|
||||
export $(grep -v '^#' $ENV_FILE | xargs)
|
||||
|
||||
# Use the specified environment file with docker-compose
|
||||
COMPOSE_FILES="-f docker-compose.yml"
|
||||
fi
|
||||
|
||||
# Start Docker Compose with the specified configuration files
|
||||
docker-compose $COMPOSE_FILES build --no-cache
|
||||
docker-compose $COMPOSE_FILES up -d --build
|
||||
Reference in New Issue
Block a user