This repository was archived by the owner on Feb 27, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
75 lines (72 loc) · 2.28 KB
/
docker-compose.yml
File metadata and controls
75 lines (72 loc) · 2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
version: "3.8"
services:
# Optional local MySQL database with persistent storage.
# Enable with: `docker compose --profile with-db up --build`
# Then set DATABASE_URL to use host `db`, e.g.:
# DATABASE_URL="mysql://freeman:freemanpass@db:3306/freemannotes"
db:
image: mysql:8.4
profiles: ["with-db"]
restart: unless-stopped
environment:
MYSQL_DATABASE: freemannotes
MYSQL_USER: freeman
MYSQL_PASSWORD: freemanpass
MYSQL_ROOT_PASSWORD: rootpass
command: ["--default-authentication-plugin=mysql_native_password"]
ports:
- "3306:3306"
volumes:
- mysql_data:/var/lib/mysql
# Optional local PostgreSQL database (Postgres 14+). Enable with:
# `docker compose --profile with-db-postgres up --build`
# Then set DATABASE_URL to use host `postgres`, e.g.:
# DATABASE_URL="postgresql://freeman:freemanpass@postgres:5432/freemannotes"
postgres:
image: postgres:14
profiles: ["with-db-postgres"]
restart: unless-stopped
environment:
POSTGRES_DB: freemannotes
POSTGRES_USER: freeman
POSTGRES_PASSWORD: freemanpass
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
freemannotes:
build: .
ports:
- "4000:4000"
env_file:
- .env
environment:
- OCR_SERVICE_URL=http://ocr:8080/ocr
# Optional (Unraid-style): run app as host uid/gid and set process umask.
# - PUID=${PUID:-99}
# - PGID=${PGID:-100}
# - UMASK=${UMASK:-002}
# Store uploads (avatars + note images). In Unraid, set UPLOADS_VOLUME to a host path
# on the array (e.g. /mnt/user/...) to avoid using Docker's default data-root on cache.
- UPLOADS_DIR=${UPLOADS_DIR:-/app/uploads}
volumes:
# If UPLOADS_VOLUME is an absolute path, this becomes a bind mount.
# If UPLOADS_VOLUME is a name (default: uploads_data), this becomes a named volume.
- ${UPLOADS_VOLUME:-uploads_data}:${UPLOADS_DIR:-/app/uploads}
depends_on:
- ocr
ocr:
build:
context: .
dockerfile: ocr-service/Dockerfile
expose:
- "8080"
# MySQL is external; if you run MySQL in compose, add it here and adjust .env
# networks:
# - appnet
#networks:
# appnet:
# driver: bridge
volumes:
mysql_data:
uploads_data: