build: up-to-date docker compose

This commit is contained in:
ae 2025-04-10 21:34:40 +03:00
parent a969629f2d
commit 5edfb87d3b
Signed by: ae
GPG Key ID: 995EFD5C1B532B3E
3 changed files with 27 additions and 21 deletions

View File

@ -1,3 +1,5 @@
# shellcheck disable=all
# Database
PG_USER=""
PG_PASS=""
@ -5,4 +7,11 @@ PG_DB=""
# Server
JWT_SECRET=""
LOG_LEVEL="debug"
CSRF_SECRET="" # Should be 32 bytes long
ADMIN_USERNAME=""
ADMIN_PASSWORD=""
LOG_LEVEL="info"
APP_ENV="production"
DOMAIN=""
FRONTEND_URL=""

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
data/
TASKS.md
.env

View File

@ -10,8 +10,7 @@ services:
retries: 5
timeout: 5s
volumes:
# Alternatively mount to disk -> ${PWD}/data
- notatest-data:/var/lib/postgresql/data
- ${PWD}/data:/var/lib/postgresql/data
networks:
- notatest
environment:
@ -27,35 +26,32 @@ services:
image: notatest-server:latest
networks:
- notatest
ports:
- 8080:8080 # TODO: remove forwarding after testing
depends_on:
notatest-psql:
condition: service_healthy
environment:
JWT_SECRET: ${JWT_SECRET:?jwt secret required}
DB_URL: postgres://${PG_USER:-notatest}:${PG_PASS:?db password required}@notatest-psql/${PG_DB:-notatest}?sslmode=disable
LOG_LEVEL: ${LOG_LEVEL:-info}
CSRF_SECRET: ${CSRF_SECRET:?csrf secret required}
ADMIN_USERNAME: ${ADMIN_USERNAME:?init admin username required}
ADMIN_PASSWORD: ${ADMIN_PASSWORD:?init admin password required}
LOG_LEVEL: ${LOG_LEVEL:-info}
APP_ENV: ${APP_ENV:-production}
DOMAIN: ${DOMAIN:-localhost}
FRONTEND_URL: ${FRONTEND_URL:-http://localhost:5173}
# notatest-web:
# build: ${PWD}/web
# image: notatest/web
# container_name: notatest-web
# networks:
# - notatest
# ports:
# - 3030:3030
# depends_on:
# notatest-psql:
# condition: service_healthy
# notatest-server:
notatest-web:
build: ${PWD}/web
image: notatest/web
container_name: notatest-web
networks:
- notatest
ports:
- 3000:80 # Defined in nginx.conf
depends_on:
- notatest-server
networks:
notatest:
external: false
name: notatest
volumes:
notatest-data: