142 lines
3.2 KiB
YAML
142 lines
3.2 KiB
YAML
version: '3'
|
|
|
|
networks:
|
|
laravel:
|
|
# mysql:
|
|
# external: true
|
|
# name: mysql
|
|
traefik:
|
|
external: true
|
|
name: traefik
|
|
|
|
services:
|
|
nginx:
|
|
image: nginx:alpine-slim
|
|
restart: always
|
|
ports:
|
|
- '8080:80'
|
|
container_name: shipping-nginx
|
|
volumes:
|
|
# Please update below path as per your environment.
|
|
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
|
|
depends_on:
|
|
- php
|
|
- laravel-redis
|
|
# - laravel-queue
|
|
# - laravel-cron
|
|
# - phpmyadmin
|
|
networks:
|
|
- laravel
|
|
- traefik
|
|
labels:
|
|
traefik.enable: true
|
|
# https
|
|
traefik.http.routers.shipping.entrypoints: https
|
|
traefik.http.routers.shipping.rule: Host(`shipping.dalkove-ovladace.cz`)
|
|
# traefik.http.routers.shipping.service: shipping
|
|
traefik.http.services.shipping.loadbalancer.server.port: 80
|
|
traefik.http.routers.shipping.tls.certresolver: mytlschallenge
|
|
|
|
php:
|
|
container_name: shipping-php
|
|
user: "www-data"
|
|
# restart: always
|
|
platform: linux/amd64
|
|
build:
|
|
# Please update below path as per your environment.
|
|
context: .
|
|
dockerfile: ./docker/php/Dockerfile
|
|
ports:
|
|
- '9001:9001'
|
|
volumes:
|
|
- ./src:/var/www/html
|
|
- ./src/.env:/var/www/html/.env
|
|
- ./docker/roadrunner.yaml:/var/www/html/.rr.yaml
|
|
- ./docker/policy.xml:/etc/ImageMagick-6/policy.xml
|
|
networks:
|
|
- laravel
|
|
- traefik
|
|
depends_on:
|
|
- laravel-redis
|
|
|
|
laravel-redis:
|
|
image: redis:alpine
|
|
container_name: laravel-redis
|
|
restart: unless-stopped
|
|
ports:
|
|
- 6380:6379
|
|
networks:
|
|
- laravel
|
|
- traefik
|
|
|
|
npm:
|
|
image: node:alpine
|
|
# container_name: npm
|
|
volumes:
|
|
- ./src:/var/www/html
|
|
- ./src/.env:/var/www/html/.env
|
|
ports:
|
|
- 3000:3000
|
|
- 3001:3001
|
|
working_dir: /var/www/html
|
|
profiles: [ "npm" ]
|
|
entrypoint: [ 'npm' ]
|
|
networks:
|
|
- laravel
|
|
- traefik
|
|
|
|
horizon:
|
|
container_name: shipping-horizon
|
|
platform: linux/arm64/v8
|
|
build:
|
|
context: .
|
|
dockerfile: ./docker/horizon.dockerfile
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./src:/var/www/html
|
|
- ./src/.env:/var/www/html/.env
|
|
- ./docker/supervisor/horizon.conf:/etc/supervisor/conf.d/horizon.conf
|
|
- ./docker/policy.xml:/etc/ImageMagick-6/policy.xml
|
|
depends_on:
|
|
- laravel-redis
|
|
networks:
|
|
- laravel
|
|
- traefik
|
|
|
|
|
|
|
|
pdf_manager:
|
|
container_name: shipping-pdf_manager
|
|
build:
|
|
context: .
|
|
dockerfile: ./docker/python/Dockerfile
|
|
ports:
|
|
- "5001:5000"
|
|
volumes:
|
|
- ./src/scripts/pdf_manage.py:/app/pdf_manage.py
|
|
- ./src/scripts/pdf_data:/app/pdfs
|
|
networks:
|
|
- laravel
|
|
- traefik
|
|
|
|
|
|
|
|
|
|
laravel-cron:
|
|
build:
|
|
context: ./docker
|
|
dockerfile: php.dockerfile
|
|
args:
|
|
- UID=${UID:-1001}
|
|
- GID=${GID:-1001}
|
|
- USER=${USER:-laravel}
|
|
container_name: laravel-cron
|
|
volumes:
|
|
- ./src:/var/www/html
|
|
- ./src/.env:/var/www/html/.env
|
|
|
|
working_dir: /var/www/html
|
|
entrypoint: [ 'php', '/var/www/html/artisan', 'schedule:work' ]
|
|
networks:
|
|
- laravel
|
|
- traefik |