feat(docker): add docker-compose.yml and .dockerignore for production
This commit is contained in:
parent
fa10d792fa
commit
2645aff3af
|
|
@ -1,10 +1,37 @@
|
|||
node_modules
|
||||
vendor
|
||||
.git
|
||||
.gitignore
|
||||
.gitattributes
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
.sisyphus/
|
||||
.dev.pid
|
||||
.DS_Store
|
||||
.editorconfig
|
||||
.php-cs-fixer.cache
|
||||
|
||||
vendor/
|
||||
node_modules/
|
||||
|
||||
tests/
|
||||
test-results/
|
||||
phpunit.xml
|
||||
playwright.config.ts
|
||||
|
||||
.idea/
|
||||
.vscode/
|
||||
*.swp
|
||||
*.swo
|
||||
|
||||
docs/
|
||||
README.md
|
||||
ref/
|
||||
|
||||
start_dev.sh
|
||||
stop_dev.sh
|
||||
use_local_pp_lib.sh
|
||||
|
||||
storage/logs/*
|
||||
storage/framework/cache/*
|
||||
storage/framework/views/*
|
||||
test-results
|
||||
tests/e2e/.auth
|
||||
.dev.pid
|
||||
storage/framework/sessions/*
|
||||
|
|
|
|||
|
|
@ -1,3 +1,23 @@
|
|||
# =============================================================================
|
||||
# Caddy configuration (add to your Caddy instance's Caddyfile):
|
||||
#
|
||||
# your-domain.example.com {
|
||||
# root * /path/on/caddy/host/to/pp-planer/public
|
||||
# php_fastcgi pp-planer-app:9000 {
|
||||
# root /app/public
|
||||
# }
|
||||
# file_server
|
||||
# encode gzip
|
||||
# }
|
||||
#
|
||||
# Notes:
|
||||
# - "root *" = path on the Caddy HOST to the bind-mounted ./public directory
|
||||
# - "root /app/public" inside php_fastcgi = path INSIDE this container
|
||||
# - "pp-planer-app" resolves via the shared "caddy" Docker network
|
||||
# - Both Caddy and this container must be on the "caddy" external network
|
||||
# - The ./public directory is bind-mounted so Caddy can serve static files
|
||||
# =============================================================================
|
||||
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
|
|
@ -5,54 +25,23 @@ services:
|
|||
dockerfile: build/Dockerfile
|
||||
container_name: pp-planer-app
|
||||
restart: unless-stopped
|
||||
working_dir: /app
|
||||
environment:
|
||||
- WWWUSER=${WWWUSER:-1000}
|
||||
- WWWGROUP=${WWWGROUP:-1000}
|
||||
- APP_ENV=${APP_ENV}
|
||||
- APP_DEBUG=${APP_DEBUG}
|
||||
- APP_KEY=${APP_KEY}
|
||||
- APP_URL=${APP_URL}
|
||||
- DB_CONNECTION=${DB_CONNECTION}
|
||||
- CTS_API_URL=${CTS_API_URL}
|
||||
- CTS_API_TOKEN=${CTS_API_TOKEN}
|
||||
- CHURCHTOOLS_URL=${CHURCHTOOLS_URL}
|
||||
- CHURCHTOOLS_CLIENT_ID=${CHURCHTOOLS_CLIENT_ID}
|
||||
- CHURCHTOOLS_CLIENT_SECRET=${CHURCHTOOLS_CLIENT_SECRET}
|
||||
- CHURCHTOOLS_REDIRECT_URI=${CHURCHTOOLS_REDIRECT_URI}
|
||||
volumes:
|
||||
- ./:/app
|
||||
- /app/node_modules
|
||||
- /app/vendor
|
||||
- ./.env:/app/.env:ro
|
||||
- ./storage:/app/storage
|
||||
- ./database:/app/database
|
||||
- ./public:/app/public
|
||||
expose:
|
||||
- "9000"
|
||||
networks:
|
||||
- caddy
|
||||
- internal
|
||||
|
||||
node:
|
||||
image: node:20-alpine
|
||||
container_name: pp-planer-node
|
||||
restart: unless-stopped
|
||||
working_dir: /app
|
||||
environment:
|
||||
- NODE_ENV=development
|
||||
volumes:
|
||||
- ./:/app
|
||||
- /app/node_modules
|
||||
expose:
|
||||
- "5173"
|
||||
networks:
|
||||
- caddy
|
||||
- internal
|
||||
command: sh -c "npm install && npm run dev"
|
||||
|
||||
# mysql:
|
||||
# image: mysql:8.0
|
||||
# container_name: pp-planer-mysql
|
||||
# restart: unless-stopped
|
||||
# environment:
|
||||
# MYSQL_DATABASE: ${DB_DATABASE}
|
||||
# MYSQL_DATABASE: ${DB_DATABASE:-pp_planer}
|
||||
# MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
|
||||
# MYSQL_PASSWORD: ${DB_PASSWORD}
|
||||
# MYSQL_USER: ${DB_USERNAME}
|
||||
|
|
@ -61,6 +50,9 @@ services:
|
|||
# networks:
|
||||
# - internal
|
||||
|
||||
# volumes:
|
||||
# mysql_data:
|
||||
|
||||
networks:
|
||||
caddy:
|
||||
external: true
|
||||
|
|
|
|||
Loading…
Reference in a new issue