podcastartgenerator/docker-compose.yml

117 lines
3.7 KiB
YAML
Raw Normal View History

version: '3'
services:
laravel-app:
env_file: .env
build:
context: .
dockerfile: Dockerfile
container_name: ${CONTAINER_NAME:-pcag-laravel}
volumes:
- ${PATH_TO_SITE}:/var/www/html
- ${PATH_TO_STATIC}:/static
- ./nginx/default.conf:/etc/nginx/sites-available/default
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
environment:
TZ: UTC
PUID: ${UID:-1000}
PGID: ${GID:-1000}
REDIS_HOST: redis
DB_HOST: db
DB_DATABASE: ${LIVE_DB_DATABASE}
DB_USERNAME: ${LIVE_DB_USERNAME}
DB_PASSWORD: ${LIVE_DB_PASSWORD}
LARAVEL_QUEUE_ENABLED: true
LARAVEL_QUEUE_OPTIONS: --timeout=60 --tries=3 redis
LARAVEL_SCHEDULE_ENABLED: true
PHP_OPEN_BASEDIR: "/var/www/html:/static"
ports:
- "8776:80"
networks:
- proxy
- default
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
# Entry Point for https
- "traefik.http.routers.podcastartgen-secure.entrypoints=websecure"
2023-12-17 16:43:00 -05:00
- "traefik.http.routers.podcastartgen-secure.rule=Host(`www.noagendaartgenerator.com`) || HOST(`noagendaartgenerator.com`)"
- "traefik.http.routers.podcastartgen-secure.service=podcastartgen-service"
- "traefik.http.services.podcastartgen-service.loadbalancer.server.port=80"
links:
- db
- redis
- static
static:
image: nginx:alpine
volumes:
- ${PATH_TO_STATIC}:/usr/share/nginx/html
environment:
TZ: UTC
PUID: ${UID:-1000}
PGID: ${GID:-1000}
ports:
- "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"
db:
image: mariadb:latest
env_file: .env
environment:
TZ: UTC
MARIADB_ROOT_PASSWORD: ${LIVE_DB_ROOT_PASSWORD}
MARIADB_USER: ${LIVE_DB_USERNAME}
MARIADB_DATABASE: ${LIVE_DB_DATABASE}
MARIADB_PASSWORD: ${LIVE_DB_PASSWORD}
volumes:
- "./db/data:/var/lib/mysql"
- "./db/dump:/docker-entrypoint-initdb.d"
networks:
- proxy
- default
ports:
- "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"
redis:
image: redis:alpine
command: redis-server --appendonly yes --requirepass ${REDIS_SEC_PASSWORD}
ports:
- "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"
npm:
image: node:latest
working_dir: /var/www/html
entrypoint: ["npm"]
volumes:
- ./site:/var/www/html
networks:
proxy:
external: true