7 files changed
+312
-23
No files matched your search
+102
@@ -0,0 +1,102 @@
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
target: app
|
||||
image: nextchair-laravel:latest
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
APP_ENV: ${APP_ENV:-production}
|
||||
APP_DEBUG: ${APP_DEBUG:-false}
|
||||
APP_URL: ${APP_URL:-http://localhost:8085}
|
||||
DB_CONNECTION: mysql
|
||||
DB_HOST: db
|
||||
DB_PORT: 3306
|
||||
DB_DATABASE: ${DB_DATABASE:-nextchair}
|
||||
DB_USERNAME: ${DB_USERNAME:-nextchair}
|
||||
DB_PASSWORD: ${DB_PASSWORD:?Set DB_PASSWORD in .env}
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- nextchair_storage:/var/www/html/storage
|
||||
|
||||
nginx:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
target: nginx
|
||||
image: nextchair-nginx:latest
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- app
|
||||
ports:
|
||||
- "${NEXTCHAIR_HTTP_BIND:-127.0.0.1}:${NEXTCHAIR_HTTP_PORT:-8085}:80"
|
||||
volumes:
|
||||
- nextchair_storage:/var/www/html/storage:ro
|
||||
|
||||
db:
|
||||
image: mysql:8.4
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
MYSQL_DATABASE: ${DB_DATABASE:-nextchair}
|
||||
MYSQL_USER: ${DB_USERNAME:-nextchair}
|
||||
MYSQL_PASSWORD: ${DB_PASSWORD:?Set DB_PASSWORD in .env}
|
||||
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:?Set DB_ROOT_PASSWORD in .env}
|
||||
volumes:
|
||||
- nextchair_mysql_data:/var/lib/mysql
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "mysqladmin ping -h localhost -u root -p$$MYSQL_ROOT_PASSWORD --silent"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 20
|
||||
start_period: 20s
|
||||
|
||||
queue:
|
||||
image: nextchair-laravel:latest
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
APP_ENV: ${APP_ENV:-production}
|
||||
APP_DEBUG: ${APP_DEBUG:-false}
|
||||
DB_CONNECTION: mysql
|
||||
DB_HOST: db
|
||||
DB_PORT: 3306
|
||||
DB_DATABASE: ${DB_DATABASE:-nextchair}
|
||||
DB_USERNAME: ${DB_USERNAME:-nextchair}
|
||||
DB_PASSWORD: ${DB_PASSWORD:?Set DB_PASSWORD in .env}
|
||||
command: ["php", "artisan", "queue:work", "--sleep=3", "--tries=3", "--timeout=90"]
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- nextchair_storage:/var/www/html/storage
|
||||
|
||||
scheduler:
|
||||
image: nextchair-laravel:latest
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
APP_ENV: ${APP_ENV:-production}
|
||||
APP_DEBUG: ${APP_DEBUG:-false}
|
||||
DB_CONNECTION: mysql
|
||||
DB_HOST: db
|
||||
DB_PORT: 3306
|
||||
DB_DATABASE: ${DB_DATABASE:-nextchair}
|
||||
DB_USERNAME: ${DB_USERNAME:-nextchair}
|
||||
DB_PASSWORD: ${DB_PASSWORD:?Set DB_PASSWORD in .env}
|
||||
command: ["php", "artisan", "schedule:work"]
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- nextchair_storage:/var/www/html/storage
|
||||
|
||||
volumes:
|
||||
nextchair_mysql_data:
|
||||
nextchair_storage:
|
||||
Reference in new issue
Block a user