mirror of
https://github.com/ZTatman/myst.git
synced 2026-11-22 12:57:58 +00:00
Update Docker setup for uv best practices
- Remove obsolete docker-compose.example.yml (replaced by root docker-compose.yml) - Update .dockerignore with Python/uv exclusions (web/.venv, uv.lock, *.pyc) - Improve web/Dockerfile per uv docs (UV_NO_DEV=1, --no-cache, /bin/ paths)
This commit is contained in:
parent
dcf60f4082
commit
72c3bc8fbe
3 changed files with 15 additions and 46 deletions
|
|
@ -1,4 +1,15 @@
|
||||||
|
# Node.js / npm
|
||||||
node_modules
|
node_modules
|
||||||
|
package-lock.json
|
||||||
|
pnpm-lock.yaml
|
||||||
|
|
||||||
|
# Python / uv
|
||||||
|
web/.venv
|
||||||
|
web/__pycache__
|
||||||
|
web/*.pyc
|
||||||
|
uv.lock
|
||||||
|
|
||||||
|
# General
|
||||||
.git
|
.git
|
||||||
*.log
|
*.log
|
||||||
.env
|
.env
|
||||||
|
|
|
||||||
|
|
@ -1,42 +0,0 @@
|
||||||
# Docker Compose example for deploying Myst with PostgreSQL
|
|
||||||
#
|
|
||||||
# Usage:
|
|
||||||
# 1. Copy to docker-compose.yml: cp packages/cli/examples/docker-compose.example.yml docker-compose.yml
|
|
||||||
# 2. Edit .env with your Forgejo config
|
|
||||||
# 3. Run: docker compose up -d
|
|
||||||
#
|
|
||||||
# The DATABASE_URL is auto-handled by Docker Compose networking.
|
|
||||||
|
|
||||||
services:
|
|
||||||
myst:
|
|
||||||
image: myst:latest
|
|
||||||
container_name: myst
|
|
||||||
restart: unless-stopped
|
|
||||||
ports:
|
|
||||||
- "3000:3000"
|
|
||||||
environment:
|
|
||||||
- DATABASE_URL=postgresql://myst:myst@db:5432/myst
|
|
||||||
env_file:
|
|
||||||
- .env
|
|
||||||
depends_on:
|
|
||||||
db:
|
|
||||||
condition: service_healthy
|
|
||||||
|
|
||||||
db:
|
|
||||||
image: postgres:16-alpine
|
|
||||||
container_name: myst-db
|
|
||||||
restart: unless-stopped
|
|
||||||
environment:
|
|
||||||
- POSTGRES_USER=myst
|
|
||||||
- POSTGRES_PASSWORD=myst
|
|
||||||
- POSTGRES_DB=myst
|
|
||||||
volumes:
|
|
||||||
- myst-postgres:/var/lib/postgresql/data
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD-SHELL", "pg_isready -U myst -d myst"]
|
|
||||||
interval: 5s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 5
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
myst-postgres:
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
FROM python:3.13-slim
|
FROM python:3.13-slim
|
||||||
|
|
||||||
|
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
|
|
||||||
|
|
||||||
COPY pyproject.toml uv.lock ./
|
COPY pyproject.toml uv.lock ./
|
||||||
RUN uv sync --frozen
|
RUN UV_NO_DEV=1 uv sync --frozen --no-cache
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue