fuck
This commit is contained in:
parent
51fb6d2b4b
commit
5a7cfd8f9a
1 changed files with 57 additions and 0 deletions
57
docker-compose.yml
Normal file
57
docker-compose.yml
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
version: '3.9'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
environment:
|
||||
POSTGRES_DB: vbytes
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
|
||||
volumes:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ['CMD-SHELL', 'pg_isready -U postgres']
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
restart: unless-stopped
|
||||
|
||||
api:
|
||||
build: ./api
|
||||
environment:
|
||||
DATABASE_URL: postgres://postgres:${POSTGRES_PASSWORD:-postgres}@db:5432/vbytes
|
||||
DATABASE_MAX_CONNECTIONS: 10
|
||||
JWT_SECRET: ${JWT_SECRET:-dev_jwt_secret}
|
||||
JWT_ISSUER: vbytes-api
|
||||
JWT_TTL_SECONDS: 86400
|
||||
JWT_COOKIE_NAME: auth_token
|
||||
JWT_COOKIE_SECURE: ${JWT_COOKIE_SECURE:-false}
|
||||
ADMIN_USERNAME: ${ADMIN_USERNAME:-admin}
|
||||
ADMIN_PASSWORD: ${ADMIN_PASSWORD:-admin123}
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
|
||||
web:
|
||||
build: ./web
|
||||
environment:
|
||||
API_BASE_URL: http://api:8080
|
||||
HOST: 0.0.0.0
|
||||
PORT: 3000
|
||||
depends_on:
|
||||
api:
|
||||
condition: service_started
|
||||
restart: unless-stopped
|
||||
|
||||
cloudflared:
|
||||
image: cloudflare/cloudflared:latest
|
||||
command: ['tunnel', 'run', '--token', '${TUNNEL_TOKEN}']
|
||||
environment:
|
||||
TUNNEL_TOKEN: ${TUNNEL_TOKEN}
|
||||
depends_on:
|
||||
- web
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
postgres-data:
|
||||
Loading…
Reference in a new issue