mirror of
https://github.com/vhaudiquet/homeprod.git
synced 2025-12-19 12:36:03 +00:00
notesnook: removed useless services
This commit is contained in:
@@ -1,38 +1,4 @@
|
|||||||
services:
|
services:
|
||||||
validate:
|
|
||||||
image: vandot/alpine-bash
|
|
||||||
entrypoint: /bin/bash
|
|
||||||
env_file: .env
|
|
||||||
command:
|
|
||||||
- -c
|
|
||||||
- |
|
|
||||||
# List of required environment variables
|
|
||||||
required_vars=(
|
|
||||||
"INSTANCE_NAME"
|
|
||||||
"NOTESNOOK_API_SECRET"
|
|
||||||
"DISABLE_SIGNUPS"
|
|
||||||
"SMTP_USERNAME"
|
|
||||||
"SMTP_PASSWORD"
|
|
||||||
"SMTP_HOST"
|
|
||||||
"SMTP_PORT"
|
|
||||||
"AUTH_SERVER_PUBLIC_URL"
|
|
||||||
"NOTESNOOK_APP_PUBLIC_URL"
|
|
||||||
"MONOGRAPH_PUBLIC_URL"
|
|
||||||
"ATTACHMENTS_SERVER_PUBLIC_URL"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Check each required environment variable
|
|
||||||
for var in "$${required_vars[@]}"; do
|
|
||||||
if [ -z "$${!var}" ]; then
|
|
||||||
echo "Error: Required environment variable $$var is not set."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "All required environment variables are set."
|
|
||||||
# Ensure the validate service runs first
|
|
||||||
restart: "no"
|
|
||||||
|
|
||||||
notesnook-db:
|
notesnook-db:
|
||||||
image: mongo:8.0.15
|
image: mongo:8.0.15
|
||||||
hostname: notesnookdb
|
hostname: notesnookdb
|
||||||
@@ -49,26 +15,6 @@ services:
|
|||||||
retries: 3
|
retries: 3
|
||||||
start_period: 60s
|
start_period: 60s
|
||||||
|
|
||||||
# the notesnook sync server requires transactions which only work
|
|
||||||
# with a MongoDB replica set.
|
|
||||||
# This job just runs `rs.initiate()` on our mongodb instance
|
|
||||||
# upgrading it to a replica set. This is only required once but we running
|
|
||||||
# it multiple times is no issue.
|
|
||||||
initiate-rs0:
|
|
||||||
image: mongo:8.0.15
|
|
||||||
networks:
|
|
||||||
- notesnook
|
|
||||||
depends_on:
|
|
||||||
- notesnook-db
|
|
||||||
entrypoint: /bin/sh
|
|
||||||
command:
|
|
||||||
- -c
|
|
||||||
- |
|
|
||||||
mongosh mongodb://notesnookdb:27017 <<EOF
|
|
||||||
rs.initiate();
|
|
||||||
rs.status();
|
|
||||||
EOF
|
|
||||||
|
|
||||||
notesnook-s3:
|
notesnook-s3:
|
||||||
image: minio/minio:RELEASE.2024-07-29T22-14-52Z
|
image: minio/minio:RELEASE.2024-07-29T22-14-52Z
|
||||||
# ports:
|
# ports:
|
||||||
@@ -96,24 +42,6 @@ services:
|
|||||||
- "traefik.docker.network=proxy"
|
- "traefik.docker.network=proxy"
|
||||||
- "traefik.http.routers.notesnook-s3.entrypoints=http"
|
- "traefik.http.routers.notesnook-s3.entrypoints=http"
|
||||||
|
|
||||||
# There's no way to specify a default bucket in Minio so we have to
|
|
||||||
# set it up ourselves.
|
|
||||||
setup-s3:
|
|
||||||
image: minio/mc:RELEASE.2024-07-26T13-08-44Z
|
|
||||||
depends_on:
|
|
||||||
- notesnook-s3
|
|
||||||
networks:
|
|
||||||
- notesnook
|
|
||||||
entrypoint: /bin/bash
|
|
||||||
env_file: .env
|
|
||||||
command:
|
|
||||||
- -c
|
|
||||||
- |
|
|
||||||
until mc alias set minio http://notesnook-s3:9000 ${MINIO_ROOT_USER:-minioadmin} ${MINIO_ROOT_PASSWORD:-minioadmin}; do
|
|
||||||
sleep 1;
|
|
||||||
done;
|
|
||||||
mc mb minio/attachments -p
|
|
||||||
|
|
||||||
identity-server:
|
identity-server:
|
||||||
image: streetwriters/identity:v1.0-beta.3
|
image: streetwriters/identity:v1.0-beta.3
|
||||||
ports:
|
ports:
|
||||||
@@ -272,16 +200,7 @@ services:
|
|||||||
- "traefik.docker.network=proxy"
|
- "traefik.docker.network=proxy"
|
||||||
- "traefik.http.routers.monograph-server.entrypoints=http"
|
- "traefik.http.routers.monograph-server.entrypoints=http"
|
||||||
- "traefik.http.services.monograph-server.loadbalancer.server.port=3000"
|
- "traefik.http.services.monograph-server.loadbalancer.server.port=3000"
|
||||||
autoheal:
|
|
||||||
image: willfarrell/autoheal:latest
|
|
||||||
tty: true
|
|
||||||
restart: always
|
|
||||||
environment:
|
|
||||||
- AUTOHEAL_INTERVAL=60
|
|
||||||
- AUTOHEAL_START_PERIOD=300
|
|
||||||
- AUTOHEAL_DEFAULT_STOP_TIMEOUT=10
|
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
networks:
|
networks:
|
||||||
notesnook:
|
notesnook:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user