From 2600be7b532c60ee6d1367795323e0f48865c7c7 Mon Sep 17 00:00:00 2001 From: zino Date: Tue, 28 Nov 2023 20:52:28 +0100 Subject: [PATCH] modified --- .env | 26 ++++++++++++++++++++++++++ .gitignore | 5 +++++ docker-compose.yml | 38 ++++++++++++++++++++++++++++++++++++++ volumes/.gitkeep | 0 4 files changed, 69 insertions(+) create mode 100644 .env create mode 100644 .gitignore create mode 100644 docker-compose.yml create mode 100644 volumes/.gitkeep diff --git a/.env b/.env new file mode 100644 index 0000000..e23f73a --- /dev/null +++ b/.env @@ -0,0 +1,26 @@ +# ============================================================================= +# PRODUCTION CONFIG EXAMPLE +# ----------------------------------------------------------------------------- +# By default it will use SQLite, but that's mostly to test and evaluate the +# server. So you'll want to specify db connection settings to use Postgres. +# ============================================================================= +# +APP_BASE_URL=https://joplin.zinomedia.de +APP_PORT=22300 +# +# DB_CLIENT=pg +POSTGRES_PASSWORD=7UN@nN9cKdz6NFN& +POSTGRES_DATABASE=joplin +POSTGRES_USER=joplin +POSTGRES_PORT=5432 +# POSTGRES_HOST=localhost + +# ============================================================================= +# DEV CONFIG EXAMPLE +# ----------------------------------------------------------------------------- +# Example of local config, for development. In dev mode, you would usually use +# SQLite so database settings are not needed. +# ============================================================================= +# +# APP_BASE_URL=http://localhost:22300 +# APP_PORT=22300 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5102695 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +# Ignore everything in the volumes/html directory +volumes/* + +# Do not ignore a special file name +!.gitkeep \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..1cd8b30 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,38 @@ +version: "3.8" + +services: + joplin-postgres: + image: postgres:16 + container_name: joplin-postgres + volumes: + - ./volumes/postgres:/var/lib/postgresql/data + restart: unless-stopped + environment: + - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} + - POSTGRES_USER=${POSTGRES_USER} + - POSTGRES_DB=${POSTGRES_DATABASE} + networks: + - web + + joplin: + image: joplin/server:latest + container_name: joplin + depends_on: + - joplin-postgres + restart: unless-stopped + environment: + - APP_PORT=${APP_PORT} + - APP_BASE_URL=${APP_BASE_URL} + - DB_CLIENT=pg + - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} + - POSTGRES_DATABASE=${POSTGRES_DATABASE} + - POSTGRES_USER=${POSTGRES_USER} + - POSTGRES_PORT=${POSTGRES_PORT} + - POSTGRES_HOST=joplin-postgres + networks: + - web + +networks: + web: + external: true + name: web diff --git a/volumes/.gitkeep b/volumes/.gitkeep new file mode 100644 index 0000000..e69de29