backend docker refactor and frontend cleanup

This commit is contained in:
fred 2026-01-28 10:36:11 -08:00
parent 96443b6afe
commit 63e33a45b4
14 changed files with 130 additions and 113 deletions

View file

@ -1,8 +1,8 @@
services:
db:
container_name: recipes_postgres_${ID}
container_name: recipes_db
image: docker.io/library/postgres:17
# restart: always
restart: unless-stopped
env_file:
- .env
environment:
@ -14,34 +14,29 @@ services:
volumes:
- ./db:/var/lib/postgresql/data
backend:
image: recipes_backend
container_name: recipes_backend_${ID}
container_name: recipes_backend
image: forgejo.fredzernia.com/fred/recipes_backend:latest
restart: unless-stopped
build:
context: ./backend
args:
NODE_ENV: ${NODE_ENV}
ports:
- "${BACKEND_PORT}:3000"
volumes:
- ./backend:/usr/src/app
- ./logs:/logs
environment:
- NODE_ENV=${NODE_ENV}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- DB_NAME=${DB_NAME}
- DATABASE_URL=${PRISMA_DB_URL}
- DATABASE_URL=${DATABASE_URL}
frontend:
image: recipes_frontend
container_name: recipes_frontend_${ID}
container_name: recipes_frontend
image: forgejo.fredzernia.com/fred/recipes_frontend:latest
restart: unless-stopped
build:
context: ./backend
args:
NODE_ENV: ${NODE_ENV}
ports:
- "${FRONTEND_PORT}:80"
volumes:
- ./frontend:/usr/src/app
- ./dist/recipes_frontend:/usr/src/app/dist
environment:
- NODE_ENV=${NODE_ENV}