Add Docker and deployment configurations for development and production environments
Some checks failed
Deploy Production (crewsportswear.com) / deploy (push) Failing after 5m18s
Some checks failed
Deploy Production (crewsportswear.com) / deploy (push) Failing after 5m18s
This commit is contained in:
57
docker-compose.prod.yml
Normal file
57
docker-compose.prod.yml
Normal file
@@ -0,0 +1,57 @@
|
||||
services:
|
||||
app:
|
||||
image: crewsportswear:latest
|
||||
container_name: crewsportswear_app_prod
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- APP_ENV=${APP_ENV:-production}
|
||||
- APP_DEBUG=${APP_DEBUG:-false}
|
||||
- APP_URL=${APP_URL:-https://crewsportswear.com}
|
||||
- DB_CONNECTION=mysql
|
||||
- DB_HOST=${DB_HOST}
|
||||
- DB_PORT=${DB_PORT:-3306}
|
||||
- DB_DATABASE=${DB_DATABASE}
|
||||
- DB_USERNAME=${DB_USERNAME}
|
||||
- DB_PASSWORD=${DB_PASSWORD}
|
||||
- PROD_PRIVATE=${PROD_PRIVATE}
|
||||
- IMAGES_URL=${IMAGES_URL}
|
||||
- UPLOAD_URL=${UPLOAD_URL}
|
||||
- FORCE_HTTPS=true
|
||||
- MAIL_DRIVER=${MAIL_DRIVER}
|
||||
- MAIL_HOST=${MAIL_HOST}
|
||||
- MAIL_PORT=${MAIL_PORT}
|
||||
- MAIL_USERNAME=${MAIL_USERNAME}
|
||||
- MAIL_PASSWORD=${MAIL_PASSWORD}
|
||||
- MAIL_ENCRYPTION=${MAIL_ENCRYPTION}
|
||||
- CAPTCHA_SITE_KEY=${CAPTCHA_SITE_KEY}
|
||||
- CAPTCHA_SECRET_KEY=${CAPTCHA_SECRET_KEY}
|
||||
- ANALYTICS_SITE_ID=${ANALYTICS_SITE_ID}
|
||||
- ANALYTICS_CLIENT_ID=${ANALYTICS_CLIENT_ID}
|
||||
- ANALYTICS_SERVICE_EMAIL=${ANALYTICS_SERVICE_EMAIL}
|
||||
volumes:
|
||||
- ./storage:/var/www/html/storage
|
||||
- ./public/uploads:/var/www/html/public/uploads
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
# Production environment (crewsportswear.com) - Uses DigiCert SSL
|
||||
- "traefik.http.routers.crewsportswear-prod.rule=Host(`crewsportswear.com`) || Host(`www.crewsportswear.com`)"
|
||||
- "traefik.http.routers.crewsportswear-prod.entrypoints=websecure"
|
||||
- "traefik.http.routers.crewsportswear-prod.tls=true"
|
||||
- "traefik.http.services.crewsportswear-prod.loadbalancer.server.port=80"
|
||||
# HTTP to HTTPS redirect
|
||||
- "traefik.http.routers.crewsportswear-prod-http.rule=Host(`crewsportswear.com`) || Host(`www.crewsportswear.com`)"
|
||||
- "traefik.http.routers.crewsportswear-prod-http.entrypoints=web"
|
||||
- "traefik.http.routers.crewsportswear-prod-http.middlewares=https-redirect"
|
||||
- "traefik.http.middlewares.https-redirect.redirectscheme.scheme=https"
|
||||
networks:
|
||||
- traefik-public
|
||||
- crew-app-net
|
||||
- default
|
||||
|
||||
networks:
|
||||
traefik-public:
|
||||
external: true
|
||||
crew-app-net:
|
||||
external: true
|
||||
default:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user