chore(docker): add docker support
This commit is contained in:
94
docker-compose.dev.yml
Normal file
94
docker-compose.dev.yml
Normal file
@@ -0,0 +1,94 @@
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
target: development
|
||||
container_name: cachet-dev
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8000:8000"
|
||||
- "5173:5173"
|
||||
environment:
|
||||
- APP_NAME=Cachet
|
||||
- APP_ENV=local
|
||||
- APP_DEBUG=true
|
||||
- APP_TIMEZONE=UTC
|
||||
- APP_URL=http://localhost:8000
|
||||
- LOG_CHANNEL=stack
|
||||
- LOG_LEVEL=debug
|
||||
- DB_CONNECTION=pgsql
|
||||
- DB_HOST=database
|
||||
- DB_PORT=5432
|
||||
- DB_DATABASE=cachet
|
||||
- DB_USERNAME=cachet
|
||||
- DB_PASSWORD=secret
|
||||
- SESSION_DRIVER=database
|
||||
- QUEUE_CONNECTION=database
|
||||
- CACHE_STORE=redis
|
||||
- REDIS_HOST=redis
|
||||
- REDIS_PORT=6379
|
||||
- CACHET_BEACON=false
|
||||
- CACHET_DOCKER=true
|
||||
volumes:
|
||||
- .:/var/www/html
|
||||
- /var/www/html/vendor
|
||||
- /var/www/html/node_modules
|
||||
depends_on:
|
||||
database:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- cachet-dev
|
||||
|
||||
database:
|
||||
image: postgres:16-alpine
|
||||
container_name: cachet-dev-db
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "5432:5432"
|
||||
environment:
|
||||
- POSTGRES_DB=cachet
|
||||
- POSTGRES_USER=cachet
|
||||
- POSTGRES_PASSWORD=secret
|
||||
volumes:
|
||||
- cachet-dev-db:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U cachet -d cachet"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
- cachet-dev
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: cachet-dev-redis
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "6379:6379"
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
- cachet-dev
|
||||
|
||||
mailpit:
|
||||
image: axllent/mailpit
|
||||
container_name: cachet-dev-mail
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "1025:1025"
|
||||
- "8025:8025"
|
||||
networks:
|
||||
- cachet-dev
|
||||
|
||||
volumes:
|
||||
cachet-dev-db:
|
||||
|
||||
networks:
|
||||
cachet-dev:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user