dev: switch to fully containerized Docker Compose workflow
ci / docker (backend, backend/Dockerfile, backend) (push) Failing after 14s
ci / docker (frontend, frontend/Dockerfile, frontend) (push) Failing after 13s

- Replace tmux setup with a full Docker Compose development stack
- Update backend Dockerfile to use `cargo-chef` caching and `supervisord`
- Containerize frontend development server
- Update tests to run in isolated containers
- Remove legacy `papercrate.tmux`
This commit is contained in:
2025-12-17 19:55:47 +01:00
parent b8c2426079
commit be451bda1e
11 changed files with 396 additions and 159 deletions
+49 -18
View File
@@ -1,3 +1,17 @@
x-backend-env: &backend-env
DATABASE_URL: postgres://papercrate:papercrate_dev@postgres:5432/papercrate
DATABASE_MAX_POOL_SIZE: 2
AWS_ENDPOINT_URL: http://minio:9000
AWS_ACCESS_KEY_ID: minioadmin
AWS_SECRET_ACCESS_KEY: minioadmin
AWS_REGION: us-east-1
S3_BUCKET: documents
PROXY_DOWNLOADS: "true"
JWT_SECRET: change-me-super-secret
QUICKWIT_ENDPOINT: http://quickwit:7280
WEBAUTHN_RP_ID: localhost
WEBAUTHN_ORIGIN: http://localhost:5173
services:
postgres:
image: postgres:16-alpine
@@ -62,32 +76,49 @@ services:
timeout: 5s
retries: 5
admin-bootstrap:
server:
build:
context: ./backend
dockerfile: Dockerfile
target: development
network: host
volumes:
- ./backend:/app
environment:
<<: *backend-env
RUST_LOG: info
SERVER_HOST: 0.0.0.0
SERVER_PORT: 3000
ports:
- "3000:3000"
- "3001:3001"
depends_on:
postgres:
condition: service_healthy
minio:
condition: service_healthy
quickwit:
condition: service_healthy
createbuckets:
condition: service_completed_successfully
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
target: development
network: host
volumes:
- ./frontend:/app
- /app/node_modules
- /app/dist
ports:
- "5173:5173"
environment:
DATABASE_URL: postgres://papercrate:papercrate_dev@postgres:5432/papercrate
DATABASE_MAX_POOL_SIZE: 2
AWS_ENDPOINT_URL: http://minio:9000
AWS_ACCESS_KEY_ID: minioadmin
AWS_SECRET_ACCESS_KEY: minioadmin
AWS_REGION: us-east-1
S3_BUCKET: documents
JWT_SECRET: change-me-super-secret
QUICKWIT_ENDPOINT: http://quickwit:7280
entrypoint: []
command: >
/bin/sh -c "
echo 'Running database migrations' &&
diesel migration run
"
user: root
restart: "no"
API_PROXY_PASS: http://server:3000
depends_on:
server:
condition: service_started
volumes:
postgres_data: