Skip to content

Commit

Permalink
#42 Attend pull request review.
Browse files Browse the repository at this point in the history
  • Loading branch information
xihh87 committed Jul 9, 2024
1 parent 8c87e6e commit 0538864
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ common_param_env_vars_enabled: true
param_container_name: "{{ project_name }}"
param_usage_include_env: true
param_env_vars:
- { env_var: "DB_HOST", env_value: "<hostname or ip>", desc: "Host address of mysql database" }
- { env_var: "DB_PORT", env_value: "3306", desc: "Port to access mysql database default is 3306" }
- { env_var: "DB_HOST", env_value: "<hostname or ip>", desc: "Host address of mariadb database" }
- { env_var: "DB_PORT", env_value: "3306", desc: "Port to access mariadb database default is 3306" }
- { env_var: "DB_USER", env_value: "hedgedoc", desc: "Database user" }
- { env_var: "DB_PASS", env_value: "<secret password>", desc: "Database password" }
- { env_var: "DB_NAME", env_value: "hedgedoc", desc: "Database name" }
Expand All @@ -32,7 +32,7 @@ opt_param_env_vars:
- { env_var: "CMD_PROTOCOL_USESSL", env_value: "false", desc: "Set to `true` if accessing over https via reverse proxy." }
- { env_var: "CMD_PORT", env_value: "3000", desc: "If you wish to access hedgedoc at a port different than 80, 443 or 3000, you need to set this to that port (ie. `CMD_PORT=5000`) and change the port mapping accordingly (5000:5000)." }
- { env_var: "CMD_ALLOW_ORIGIN", env_value: "['localhost']", desc: "Comma-separated list of allowed hostnames"}
- { env_var: "CMD_DB_DIALECT", env_value: "", desc: "This variable allows using a database besides sqlite (if DB_HOST not set up) and mysql." }
- { env_var: "CMD_DB_DIALECT", env_value: "", desc: "This variable allows selecting a database engine (if DB_HOST not set up). Available options are: `mariadb`, `mysql`, `postgres`, `sqlite`." }
param_usage_include_vols: true
param_volumes:
- { vol_path: "/config", vol_host_path: "/path/to/{{ project_name }}/config", desc: "Persistent config files" }
Expand All @@ -47,7 +47,7 @@ app_setup_block: |
[Full list of HedgeDoc options](https://docs.hedgedoc.org/configuration/)
For convenience we provide a working example using Mysql as a backend in this document, if you do not wish to use our custom environment values or a Mysql database backend feel free to leverage any of the settings laid out in the link above.
For convenience we provide a working example using Mariadb as a backend in this document.
To run behind a reverse proxy we have a [preconfigured config](https://github.com/linuxserver/reverse-proxy-confs/blob/master/hedgedoc.subdomain.conf.sample) using docker networking included in our [SWAG](https://github.com/linuxserver/docker-swag) image and you can read how to use this in the [Reverse Proxy Confs repository](https://github.com/linuxserver/reverse-proxy-confs/#how-to-use-these-reverse-proxy-configs)
Expand Down
2 changes: 1 addition & 1 deletion root/etc/s6-overlay/s6-rc.d/svc-hedgedoc/run
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# if user is using our env variables set the DB_URL
if [[ -n ${DB_HOST+x} ]]; then
export CMD_DB_URL="${CMD_DB_DIALECT:-mysql}://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}"
export CMD_DB_URL="${CMD_DB_DIALECT:-mariadb}://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}"
fi

# set env var for sqlite if db url and db_host unset
Expand Down

0 comments on commit 0538864

Please sign in to comment.