2023-06-21 09:53:21 -04:00
|
|
|
version: '3'
|
2023-12-14 12:33:03 -05:00
|
|
|
|
2023-06-21 09:53:21 -04:00
|
|
|
services:
|
2023-12-14 12:33:03 -05:00
|
|
|
laravel-app:
|
|
|
|
env_file: .env
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
container_name: ${CONTAINER_NAME:-pcag-laravel}
|
2023-06-21 09:53:21 -04:00
|
|
|
volumes:
|
2023-12-14 16:21:54 -05:00
|
|
|
- ${PATH_TO_SITE}:/var/www/html
|
|
|
|
- ${PATH_TO_STATIC}:/static
|
2023-12-14 12:33:03 -05:00
|
|
|
- ./nginx/default.conf:/etc/nginx/sites-available/default
|
|
|
|
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
|
2023-06-21 09:53:21 -04:00
|
|
|
environment:
|
|
|
|
TZ: UTC
|
|
|
|
PUID: ${UID:-1000}
|
|
|
|
PGID: ${GID:-1000}
|
|
|
|
REDIS_HOST: redis
|
|
|
|
DB_HOST: db
|
2023-12-14 16:21:54 -05:00
|
|
|
DB_DATABASE: ${LIVE_DB_DATABASE}
|
|
|
|
DB_USERNAME: ${LIVE_DB_USERNAME}
|
|
|
|
DB_PASSWORD: ${LIVE_DB_PASSWORD}
|
2023-12-14 12:33:03 -05:00
|
|
|
LARAVEL_QUEUE_ENABLED: true
|
|
|
|
LARAVEL_QUEUE_OPTIONS: --timeout=60 --tries=3 redis
|
|
|
|
LARAVEL_SCHEDULE_ENABLED: true
|
|
|
|
PHP_OPEN_BASEDIR: "/var/www/html:/static"
|
2023-06-21 09:53:21 -04:00
|
|
|
ports:
|
2023-12-14 21:59:11 -05:00
|
|
|
- "8776:80"
|
|
|
|
networks:
|
|
|
|
- proxy
|
|
|
|
- default
|
|
|
|
labels:
|
|
|
|
- "traefik.enable=true"
|
|
|
|
- "traefik.docker.network=proxy"
|
|
|
|
# Entry Point for https
|
|
|
|
- "traefik.http.routers.podcastartgen-secure.entrypoints=websecure"
|
|
|
|
- "traefik.http.routers.podcastartgen-secure.rule=Host(`new.noagendaartgenerator.com`)"
|
|
|
|
- "traefik.http.routers.podcastartgen-secure.service=podcastartgen-service"
|
|
|
|
- "traefik.http.services.podcastartgen-service.loadbalancer.server.port=80"
|
2023-06-21 09:53:21 -04:00
|
|
|
links:
|
|
|
|
- db
|
|
|
|
- redis
|
|
|
|
- static
|
|
|
|
static:
|
|
|
|
image: nginx:alpine
|
|
|
|
volumes:
|
2023-12-14 21:59:11 -05:00
|
|
|
- ${PATH_TO_STATIC}:/usr/share/nginx/html
|
2023-06-21 09:53:21 -04:00
|
|
|
environment:
|
|
|
|
TZ: UTC
|
|
|
|
PUID: ${UID:-1000}
|
|
|
|
PGID: ${GID:-1000}
|
|
|
|
ports:
|
2023-12-14 21:59:11 -05:00
|
|
|
- "8777:80"
|
|
|
|
networks:
|
|
|
|
- proxy
|
|
|
|
- default
|
|
|
|
labels:
|
|
|
|
- "traefik.enable=true"
|
|
|
|
- "traefik.docker.network=proxy"
|
|
|
|
# Entry Point for https
|
|
|
|
- "traefik.http.routers.podcastartstatic-secure.entrypoints=websecure"
|
|
|
|
- "traefik.http.routers.podcastartstatic-secure.rule=Host(`static.noagendaartgenerator.com`)"
|
|
|
|
- "traefik.http.routers.podcastartstatic-secure.service=podcastartstatic-service"
|
|
|
|
- "traefik.http.services.podcastartstatic-service.loadbalancer.server.port=80"
|
2023-06-21 09:53:21 -04:00
|
|
|
db:
|
|
|
|
image: mariadb:latest
|
2023-12-14 12:33:03 -05:00
|
|
|
env_file: .env
|
2023-06-21 09:53:21 -04:00
|
|
|
environment:
|
|
|
|
TZ: UTC
|
2023-12-14 16:21:54 -05:00
|
|
|
MARIADB_ROOT_PASSWORD: ${LIVE_DB_ROOT_PASSWORD}
|
|
|
|
MARIADB_USER: ${LIVE_DB_USERNAME}
|
|
|
|
MARIADB_DATABASE: ${LIVE_DB_DATABASE}
|
|
|
|
MARIADB_PASSWORD: ${LIVE_DB_PASSWORD}
|
2023-06-21 09:53:21 -04:00
|
|
|
volumes:
|
|
|
|
- "./db/data:/var/lib/mysql"
|
|
|
|
- "./db/dump:/docker-entrypoint-initdb.d"
|
2023-12-14 21:59:11 -05:00
|
|
|
networks:
|
|
|
|
- proxy
|
|
|
|
- default
|
2023-06-21 09:53:21 -04:00
|
|
|
ports:
|
2023-12-14 21:59:11 -05:00
|
|
|
- "51533:3306" # Adjust the external port if needed
|
|
|
|
labels:
|
|
|
|
- "traefik.enable=true"
|
|
|
|
- "traefik.docker.network=proxy"
|
|
|
|
- "traefik.http.routers.podcastartdb-secure.entrypoints=websecure"
|
|
|
|
- "traefik.http.routers.podcastartdb-secure.rule=Host(`podcastartdb.noagenda.dev`)"
|
|
|
|
- "traefik.http.routers.podcastartdb-secure.service=podcastartdb-service"
|
|
|
|
- "traefik.http.services.podcastartdb-service.loadbalancer.server.port=3306"
|
2023-06-21 09:53:21 -04:00
|
|
|
redis:
|
2023-12-14 21:59:11 -05:00
|
|
|
image: redis:alpine
|
|
|
|
command: redis-server --appendonly yes --requirepass ${REDIS_SEC_PASSWORD}
|
2023-06-21 09:53:21 -04:00
|
|
|
ports:
|
2023-12-14 21:59:11 -05:00
|
|
|
- "56379:6379"
|
|
|
|
volumes:
|
|
|
|
- ./redis/redis.conf:/usr/local/etc/redis/redis.conf
|
|
|
|
- ./redis/redis-data:/var/lib/redis
|
|
|
|
environment:
|
|
|
|
- REDIS_REPLICATION_MODE=master
|
|
|
|
labels:
|
|
|
|
- "traefik.enable=true"
|
|
|
|
- "traefik.docker.network=proxy"
|
|
|
|
- "traefik.http.routers.paredis-secure.entrypoints=websecure"
|
|
|
|
- "traefik.http.routers.paredis-secure.rule=Host(`paredis.noagenda.dev`)"
|
|
|
|
- "traefik.http.routers.paredis-secure.service=paredis-service"
|
|
|
|
- "traefik.http.services.paredis-service.loadbalancer.server.port=6379"
|
2023-06-21 09:53:21 -04:00
|
|
|
npm:
|
|
|
|
image: node:latest
|
|
|
|
working_dir: /var/www/html
|
|
|
|
entrypoint: ["npm"]
|
|
|
|
volumes:
|
2023-12-14 21:59:11 -05:00
|
|
|
- ./site:/var/www/html
|
|
|
|
networks:
|
|
|
|
proxy:
|
|
|
|
external: true
|
|
|
|
|