build: create development build and a separate production compose stack
This commit is contained in:
4 files changed
+115
-33
No files matched your search
+28
-11
@@ -15,29 +15,46 @@ services:
|
||||
start_period: 10s
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "5432:5432/tcp"
|
||||
- "5432:5432"
|
||||
discord-bot:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: zyrarbot
|
||||
target: dev
|
||||
environment:
|
||||
- DISCORD_TOKEN=${DISCORD_TOKEN}
|
||||
- GUILD_ID=${GUILD_ID:-}
|
||||
- POSTGRES_DB=${POSTGRES_DB:-zyrarbot}
|
||||
- POSTGRES_USER=${POSTGRES_USER:-zyrarbot}
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-zyrarbot}
|
||||
- POSTGRES_HOST=database
|
||||
- POSTGRES_PORT=5432
|
||||
- PYTHONUNBUFFERED=1
|
||||
DISCORD_TOKEN: ${DISCORD_TOKEN}
|
||||
GUILD_ID: ${GUILD_ID:-}
|
||||
POSTGRES_DB: ${POSTGRES_DB:-zyrarbot}
|
||||
POSTGRES_USER: ${POSTGRES_USER:-zyrarbot}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-zyrarbot}
|
||||
POSTGRES_HOST: database
|
||||
POSTGRES_PORT: 5432
|
||||
PYTHONUNBUFFERED: 1
|
||||
depends_on:
|
||||
database:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- .:/app
|
||||
- ./config:/app/config
|
||||
- ./uploads:/app/uploads
|
||||
- ./frontend/dist:/app/static
|
||||
ports:
|
||||
- "80:8000"
|
||||
- "8000:8000"
|
||||
restart: unless-stopped
|
||||
frontend:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
target: frontend-deps
|
||||
working_dir: /frontend
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- test -x node_modules/.bin/vite || npm ci; exec npx vite build --watch
|
||||
volumes:
|
||||
- ./frontend:/frontend
|
||||
environment:
|
||||
VITE_BACKEND_URL: http://discord-bot:8000
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
|
||||
Reference in new issue
Block a user