Skip to content

Commit

Permalink
Merge pull request #1455 from bakaphp/feat-dev-docker-compose
Browse files Browse the repository at this point in the history
add docker compose file for development deploys
  • Loading branch information
rwhite27 committed Jun 6, 2024
2 parents 425e22f + c42a52e commit aafd723
Showing 1 changed file with 98 additions and 0 deletions.
98 changes: 98 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
services:
php:
container_name: php${APP_CONTAINER_NAME}
build:
context: .
dockerfile: development.Dockerfile
extra_hosts:
- 'host.docker.internal:host-gateway'
# command: ["sh", "-c", "php artisan lighthouse:cache && php artisan config:cache"]
environment:
WWWUSER: '${WWWUSER}'
LARAVEL_SAIL: 1
XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}'
XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}'
volumes:
- '.:/var/www/html'
- ./docker/docker-php-ext-opcache.ini:/usr/local/etc/php/conf.d/docker-php-ext-opcache.ini
- ./docker/php.ini:/usr/local/etc/php/conf.d/xz-custom.ini
networks:
- sail
queue:
container_name: queue
build:
context: .
dockerfile: development.Dockerfile
extra_hosts:
- 'host.docker.internal:host-gateway'
command: ["sh", "-c", "php artisan config:cache && php artisan queue:work --tries=3 --timeout=1750 --max-jobs=1000"]
environment:
WWWUSER: '${WWWUSER}'
LARAVEL_SAIL: 1
XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}'
XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}'
volumes:
- '.:/var/www/html'
- ./docker/docker-php-ext-opcache.ini:/usr/local/etc/php/conf.d/docker-php-ext-opcache.ini
- ./docker/php.ini:/usr/local/etc/php/conf.d/xz-custom.ini
networks:
- sail
queue-social:
container_name: queue-social
build:
context: .
dockerfile: development.Dockerfile
extra_hosts:
- 'host.docker.internal:host-gateway'
command: ["sh", "-c", "php artisan config:cache && php artisan queue:work --queue kanvas-social --tries=3 --timeout=1750 --max-jobs=1000"]
environment:
WWWUSER: '${WWWUSER}'
LARAVEL_SAIL: 1
XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}'
XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}'
volumes:
- '.:/var/www/html'
- ./docker/docker-php-ext-opcache.ini:/usr/local/etc/php/conf.d/docker-php-ext-opcache.ini
- ./docker/php.ini:/usr/local/etc/php/conf.d/xz-custom.ini
networks:
- sail
queue-notifications:
container_name: queue-notifications
build:
context: .
dockerfile: development.Dockerfile
extra_hosts:
- 'host.docker.internal:host-gateway'
command: ["sh", "-c", "php artisan config:cache && php artisan queue:work --queue notifications --tries=3 --timeout=1750 --max-jobs=1000"]
environment:
WWWUSER: '${WWWUSER}'
LARAVEL_SAIL: 1
XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}'
XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}'
volumes:
- '.:/var/www/html'
- ./docker/docker-php-ext-opcache.ini:/usr/local/etc/php/conf.d/docker-php-ext-opcache.ini
- ./docker/php.ini:/usr/local/etc/php/conf.d/xz-custom.ini
networks:
- sail
nginx:
image: nginx:latest
container_name: nginx${APP_CONTAINER_NAME}
ports:
- "80:80"
links:
- php
volumes:
- '.:/var/www/html'
- ./docker/nginx.conf:/etc/nginx/conf.d/default.conf
networks:
- sail
depends_on:
- php
healthcheck:
test: ["CMD", "service", "nginx", "status"]
retries: 3
timeout: 5s
networks:
sail:
driver: bridge

0 comments on commit aafd723

Please sign in to comment.