initial-commit

This commit is contained in:
nicwands
2026-05-26 14:38:41 -04:00
parent db078bc9d3
commit 409b926a52
2 changed files with 64 additions and 0 deletions

63
docker-compose.yml Normal file
View File

@@ -0,0 +1,63 @@
services:
takerofnotes:
container_name: takerofnotes
build:
context: .
dockerfile: Dockerfile.prod
image: takerofnotes-cms:latest
restart: unless-stopped
env_file: .env
environment:
DATABASE_CLIENT: ${DATABASE_CLIENT}
DATABASE_HOST: takerofnotesDB
DATABASE_NAME: ${DATABASE_NAME}
DATABASE_USERNAME: ${DATABASE_USERNAME}
DATABASE_PORT: ${DATABASE_PORT}
JWT_SECRET: ${JWT_SECRET}
ADMIN_JWT_SECRET: ${ADMIN_JWT_SECRET}
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
NODE_ENV: ${NODE_ENV}
volumes:
- ./.env:/opt/app/.env
- ./public/uploads:/opt/app/public/uploads
depends_on:
- takerofnotesDB
healthcheck:
test:
- CMD
- node
- "-e"
- "fetch('http://127.0.0.1:1337/admin').then((r) => {if (r.status !== 200) throw new Error(r.status)})"
timeout: 5s
interval: 5s
retries: 3
takerofnotesDB:
container_name: takerofnotesDB
platform: linux/amd64
restart: unless-stopped
env_file: .env
image: postgres:14.5-alpine
environment:
POSTGRES_USER: ${DATABASE_USERNAME}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: ${DATABASE_NAME}
volumes:
- takerofnotes-data:/var/lib/postgresql/data/
takerofnotesAdminer:
container_name: takerofnotesAdminer
image: adminer
restart: unless-stopped
environment:
- ADMINER_DEFAULT_SERVER=takerofnotesDB
depends_on:
- takerofnotesDB
volumes:
takerofnotes-data:
networks:
takerofnotes:
name: takerofnotes
driver: bridge