-
Notifications
You must be signed in to change notification settings - Fork 16
/
compose.yml
98 lines (97 loc) · 3.34 KB
/
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
version: '3.8'
services:
app:
networks:
- localnet
image: nostrcheckme/nostrcheck-server:latest
build: .
depends_on:
- mariadb
- redis
volumes:
- ./media:/usr/src/app/media
- ./resources:/usr/src/app/resources
- ./config:/usr/src/app/config
restart: always
environment:
DATABASE_HOST: "mariadb"
DATABASE_USER: "nostrcheck"
DATABASE_PASSWORD: "nostrcheck"
DATABASE_DATABASE: "nostrcheck"
REDIS_HOST: "redis"
REDIS_PORT: "6379"
REDIS_USER: "default"
REDIS_PASSWORD: ""
labels:
- "traefik.enable=true"
- "traefik.http.services.app.loadbalancer.server.port=3000"
- "traefik.http.services.app.loadbalancer.sticky=true"
- "traefik.http.services.app.loadbalancer.sticky.cookie.name=app_session"
- "traefik.http.routers.app.entrypoints=web"
# /.well-known/nostr.json -> /api/v2/nostraddress
- "traefik.http.routers.app-nostrjson.rule=Path(`/.well-known/nostr.json`)"
- "traefik.http.routers.app-nostrjson.middlewares=replacepath-nostrjson"
- "traefik.http.middlewares.replacepath-nostrjson.replacepath.path=/api/v2/nostraddress"
- "traefik.http.routers.app-nostrjson.service=app"
# /.well-known/nostr/nip96.json -> /api/v2/nip96
- "traefik.http.routers.app-nip96.rule=Path(`/.well-known/nostr/nip96.json`)"
- "traefik.http.routers.app-nip96.middlewares=replacepath-nip96"
- "traefik.http.middlewares.replacepath-nip96.replacepath.path=/api/v2/nip96"
- "traefik.http.routers.app-nip96.service=app"
# /media -> /api/v2/media
- "traefik.http.routers.app-media.rule=PathPrefix(`/media`)"
- "traefik.http.routers.app-media.middlewares=replacepathregex-media"
- "traefik.http.middlewares.replacepathregex-media.replacepathregex.regex=^/media/(.*)"
- "traefik.http.middlewares.replacepathregex-media.replacepathregex.replacement=/api/v2/media/$$1"
- "traefik.http.routers.app-media.service=app"
#
- "traefik.http.routers.app.rule=PathPrefix(`/`)"
- "traefik.http.routers.app.service=app"
# /.well-known/lnurlp -> /api/v2/lightning
- "traefik.http.routers.app-lightning.rule=Path(`/.well-known/lnurlp/`)"
- "traefik.http.routers.app-lightning.middlewares=replacepath-lightning"
- "traefik.http.middlewares.replacepath-lightning.replacepath.path=/api/v2/lightningaddress/"
- "traefik.http.routers.app-lightning.service=app"
command: "npm run start"
mariadb:
networks:
- localnet
image: mariadb:10
volumes:
- ./data/mysql:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: nostrcheck
MYSQL_DATABASE: nostrcheck
MYSQL_USER: nostrcheck
MYSQL_PASSWORD: nostrcheck
redis:
networks:
- localnet
image: redis:6
volumes:
- ./data/redis:/data
restart: always
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 10s
retries: 5
traefik:
networks:
- localnet
image: traefik:2.10
command:
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:3000"
ports:
- "3000:3000"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
restart: always
volumes:
media:
resources:
networks:
localnet: