Migrated to native Rust and containerized Postgres.

This commit is contained in:
2026-09-21 22:10:11 +02:00
parent b1b81f60f9
commit 87c5e4bab1
5 changed files with 112 additions and 43 deletions
+3 -30
View File
@@ -1,32 +1,12 @@
services:
server:
build:
context: ./server
dockerfile: Dockerfile
init: true
depends_on:
postgres:
condition: service_healthy
environment:
RUST_LOG: trace
HOST: 0.0.0.0
PORT: 3000
DATABASE_URL: postgres://expenses:expenses@postgres:5432/expenses
SQLX_OFFLINE: "true"
ports:
- "3000:3000"
volumes:
- server-target:/app/target
- ./server:/app
networks:
- expenses_net
postgres:
image: postgres:17-alpine
environment:
POSTGRES_DB: expenses
POSTGRES_USER: expenses
POSTGRES_PASSWORD: expenses
ports:
- 5432:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U expenses -d expenses"]
interval: 5s
@@ -34,13 +14,6 @@ services:
retries: 5
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- expenses_net
volumes:
server-target:
postgres-data:
networks:
expenses_net:
name: expenses_net
postgres-data: