feat(docker): add local docker-compose stack and Makefile for full stack management
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
app:
|
||||
container_name: xflow-app
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.coolify
|
||||
args:
|
||||
SITE_URL: http://localhost:3000
|
||||
DATABASE_URL: postgresql://xflow:xflow_pass@db:5432/xflow
|
||||
REDIS_URL: redis://redis:6379
|
||||
JWT_SECRET: dev-super-secret-jwt-key
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
NODE_ENV: development
|
||||
HOST: "0.0.0.0"
|
||||
PORT: "3000"
|
||||
DATABASE_URL: postgresql://xflow:xflow_pass@db:5432/xflow
|
||||
NUXT_DATABASE_URL: postgresql://xflow:xflow_pass@db:5432/xflow
|
||||
REDIS_URL: redis://redis:6379
|
||||
NUXT_REDIS_URL: redis://redis:6379
|
||||
JWT_SECRET: dev-super-secret-jwt-key
|
||||
NUXT_JWT_SECRET: dev-super-secret-jwt-key
|
||||
SITE_URL: http://localhost:3000
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_started
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- xflow-network
|
||||
|
||||
db:
|
||||
container_name: xflow-db
|
||||
image: postgres:16-alpine
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "5432:5432"
|
||||
environment:
|
||||
POSTGRES_USER: xflow
|
||||
POSTGRES_PASSWORD: xflow_pass
|
||||
POSTGRES_DB: xflow
|
||||
volumes:
|
||||
- xflow-local-pgdata:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U xflow -d xflow"]
|
||||
interval: 3s
|
||||
timeout: 3s
|
||||
retries: 5
|
||||
networks:
|
||||
- xflow-network
|
||||
|
||||
redis:
|
||||
container_name: xflow-redis
|
||||
image: redis:7.2-alpine
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "6379:6379"
|
||||
command: redis-server --appendonly yes
|
||||
volumes:
|
||||
- xflow-local-redisdata:/data
|
||||
networks:
|
||||
- xflow-network
|
||||
|
||||
volumes:
|
||||
xflow-local-pgdata:
|
||||
xflow-local-redisdata:
|
||||
|
||||
networks:
|
||||
xflow-network:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user