chore(*): adopt project templates
This commit is contained in:
+5
-98
@@ -1,98 +1,5 @@
|
||||
services:
|
||||
postgres:
|
||||
image: timescale/timescaledb:2.27.1-pg17
|
||||
profiles: [db]
|
||||
environment:
|
||||
POSTGRES_USER: ${DB__USER:-beavergram}
|
||||
POSTGRES_PASSWORD: ${DB__PASSWORD:-beavergram}
|
||||
POSTGRES_DB: ${DB__DB_NAME:-beavergram}
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
- ./backend/migrations/init:/docker-entrypoint-initdb.d:ro
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${DB__USER:-beavergram}"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
userbot:
|
||||
build: ./backend
|
||||
profiles: [userbot]
|
||||
command: [userbot]
|
||||
env_file:
|
||||
- path: backend/.env
|
||||
required: false
|
||||
- path: .env
|
||||
required: false
|
||||
environment:
|
||||
RUN_ENVIRONMENT: prod
|
||||
STORAGE__ROOT: /app/storage
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./backend/src:/app/src
|
||||
- ./backend/sessions:/app/sessions
|
||||
- ${STORAGE__ROOT:-./storage}:/app/storage
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
|
||||
api:
|
||||
build: ./backend
|
||||
profiles: [api]
|
||||
command: [api]
|
||||
env_file:
|
||||
- path: backend/.env
|
||||
required: false
|
||||
- path: .env
|
||||
required: false
|
||||
environment:
|
||||
RUN_ENVIRONMENT: prod
|
||||
STORAGE__ROOT: /app/storage
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./backend/src:/app/src
|
||||
- ./backend/sessions:/app/sessions
|
||||
- ./frontend/build:/app/static:ro
|
||||
- ${STORAGE__ROOT:-./storage}:/app/storage
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
|
||||
migrator:
|
||||
build: ./backend
|
||||
profiles: [migrate]
|
||||
env_file:
|
||||
- path: backend/.env
|
||||
required: false
|
||||
- path: .env
|
||||
required: false
|
||||
environment:
|
||||
RUN_ENVIRONMENT: prod
|
||||
volumes:
|
||||
- ./backend/src:/app/src
|
||||
- ./backend/migrations:/app/migrations
|
||||
- ./backend/alembic.ini:/app/alembic.ini
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
entrypoint: [alembic]
|
||||
command: [upgrade, head]
|
||||
|
||||
frontend-dev:
|
||||
image: oven/bun:1
|
||||
profiles: [frontend]
|
||||
working_dir: /app
|
||||
command: ["sh", "-c", "bun install && bun run dev --host 0.0.0.0 --port 5173"]
|
||||
environment:
|
||||
API_PROXY_TARGET: http://api:8080
|
||||
ALLOWED_HOSTS: ${FRONTEND_DEV_HOST:-}
|
||||
volumes:
|
||||
- ./frontend:/app
|
||||
- frontend_node_modules:/app/node_modules
|
||||
- frontend_svelte_kit:/app/.svelte-kit
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
frontend_node_modules:
|
||||
frontend_svelte_kit:
|
||||
include:
|
||||
- path: backend/docker-compose.yml
|
||||
project_directory: .
|
||||
- path: frontend/docker-compose.yml
|
||||
project_directory: .
|
||||
|
||||
Reference in New Issue
Block a user