add update nginx config to domain and create production setup docker

This commit is contained in:
2025-06-11 19:02:02 +07:00
parent 647aa51187
commit 0b211915f1
13 changed files with 1899 additions and 74 deletions

View File

@@ -62,13 +62,25 @@ check_docker() {
# Function to setup environment file
setup_env() {
if [[ ! -f .env ]]; then
if [[ -f docker/env.example ]]; then
print_status "Setting up environment file..."
cp docker/env.example .env
print_success "Environment file created: .env"
if [[ $ENVIRONMENT == "dev" ]]; then
if [[ -f docker/env.example.local ]]; then
print_status "Setting up local development environment file..."
cp docker/env.example.local .env
print_success "Local environment file created: .env"
else
print_error "Local environment template not found: docker/env.example.local"
exit 1
fi
else
print_error "No environment template found."
exit 1
if [[ -f docker/env.example.production ]]; then
print_status "Setting up production environment file..."
cp docker/env.example.production .env
print_success "Production environment file created: .env"
print_warning "⚠️ IMPORTANT: Edit .env and change all CHANGE_THIS_* passwords!"
else
print_error "Production environment template not found: docker/env.example.production"
exit 1
fi
fi
else
print_status "Environment file already exists: .env"