forked from Librum-Reader/Librum-Server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
59 lines (56 loc) · 1.83 KB
/
docker-compose.yml
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
---
version: "3.8"
services:
librum:
image: ghcr.io/librum-reader/librum-server:latest
hostname: librum
container_name: librum
ports:
- 5000:5000
networks:
- librum
volumes:
- librum:/var/lib/librum-server/librum_storage
environment:
- JWTValidIssuer=exampleIssuer # Optional. You can leave it as-is
- JWTKey=exampleOfALongSecretToken # Optional. You can leave it as-is
- SMTPEndpoint=smtp.example.com # Example for Gmail: smtp.gmail.com:587
- SMTPUsername=mailuser123
- SMTPPassword=smtpUserPassword123
- DBConnectionString=Server=mariadb;port=3306;Database=librum;Uid=librum;Pwd=mariadb;
- [email protected] # Admin login username
- AdminPassword=strongPassword123 # Admin login password
#- OpenAIToken= # Optional. Generate here: https://platform.openai.com/api-keys
restart: unless-stopped
depends_on:
librum_db:
condition: service_healthy # Ensures the DB is up before the server.
librum_db:
image: mariadb:latest
hostname: mariadb
container_name: librum_db
networks:
- librum
volumes:
- librum_db:/var/lib/mysql
environment:
- MARIADB_USER=librum
- MARIADB_PASSWORD=mariadb
- MARIADB_DATABASE=librum
- MARIADB_ROOT_PASSWORD=mariadb
restart: unless-stopped
healthcheck: # Ensures the DB is up before the server.
test: ["CMD", "mariadb-admin", "ping", "-u", "librum", "-p'mariadb'", "-h", "localhost"]
interval: 20s
timeout: 40s
retries: 3
start_period: 30s
networks:
librum:
name: "librum"
volumes:
librum:
name: "librum"
librum_db:
name: "librum_db"