-
-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
143 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Using MySQL/MariaDB | ||
|
||
To use MySQL/MariaDB as the database backend, you need to set the database URI configuration to the connection string of your MySQL/MariaDB database with this format : | ||
|
||
`mysql://<user>:<password>@<host>:<port>/<database>` | ||
|
||
#### YAML | ||
```yaml | ||
# Example | ||
db-uri: mysql://root:passwd@localhost:3306/opengist_db | ||
``` | ||
#### Environment variable | ||
```sh | ||
# Example | ||
OG_DB_URI=mysql://root:passwd@localhost:3306/opengist_db | ||
``` | ||
|
||
### Docker Compose | ||
```yml | ||
version: "3" | ||
|
||
services: | ||
opengist: | ||
image: ghcr.io/thomiceli/opengist:1 | ||
container_name: opengist | ||
restart: unless-stopped | ||
depends_on: | ||
- mysql | ||
ports: | ||
- "6157:6157" | ||
- "2222:2222" | ||
volumes: | ||
- "$HOME/.opengist:/opengist" | ||
environment: | ||
OG_DB_URI: mysql://opengist:secret@mysql:3306/opengist_db | ||
# other configuration options | ||
|
||
mysql: | ||
image: mysql:8.4 | ||
restart: unless-stopped | ||
volumes: | ||
- "./opengist-database:/var/lib/mysql" | ||
environment: | ||
MYSQL_USER: opengist | ||
MYSQL_PASSWORD: secret | ||
MYSQL_DATABASE: opengist_db | ||
MYSQL_ROOT_PASSWORD: rootsecret | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Using PostgreSQL | ||
|
||
To use PostgreSQL as the database backend, you need to set the database URI configuration to the connection string of your PostgreSQL database with this format : | ||
|
||
`postgres://<user>:<password>@<host>:<port>/<database>` | ||
|
||
#### YAML | ||
```yaml | ||
# Example | ||
db-uri: postgres://postgres:passwd@localhost:5432/opengist_db | ||
``` | ||
#### Environment variable | ||
```sh | ||
# Example | ||
OG_DB_URI=postgres://postgres:passwd@localhost:5432/opengist_db | ||
``` | ||
|
||
### Docker Compose | ||
```yml | ||
version: "3" | ||
|
||
services: | ||
opengist: | ||
image: ghcr.io/thomiceli/opengist:1 | ||
container_name: opengist | ||
restart: unless-stopped | ||
depends_on: | ||
- postgres | ||
ports: | ||
- "6157:6157" | ||
- "2222:2222" | ||
volumes: | ||
- "$HOME/.opengist:/opengist" | ||
environment: | ||
OG_DB_URI: postgres://opengist:secret@postgres:5432/opengist_db | ||
# other configuration options | ||
|
||
postgres: | ||
image: postgres:16.4 | ||
restart: unless-stopped | ||
volumes: | ||
- "./opengist-database:/var/lib/postgresql/data" | ||
environment: | ||
POSTGRES_USER: opengist | ||
POSTGRES_PASSWORD: secret | ||
POSTGRES_DB: opengist_db | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Using SQLite | ||
|
||
By default, Opengist uses SQLite as the database backend. | ||
|
||
Because SQLite is a file-based database, there is not much configuration to tweak. | ||
|
||
The configuration `db-uri`/`OG_DB_URI` refers to the path of the SQLite database file relative in the `$opengist-home/` directory (default `opengist.db`), | ||
although it can be left untouched. | ||
|
||
The SQLite journal mode is set to [`WAL` (Write-Ahead Logging)](https://www.sqlite.org/pragma.html#pragma_journal_mode) by default and can be changed. | ||
|
||
#### YAML | ||
```yaml | ||
sqlite.journal-mode: WAL | ||
``` | ||
#### Environment variable | ||
```sh | ||
OG_SQLITE_JOURNAL_MODE=WAL | ||
``` | ||
|
||
### Docker Compose | ||
```yml | ||
version: "3" | ||
|
||
services: | ||
opengist: | ||
image: ghcr.io/thomiceli/opengist:1 | ||
container_name: opengist | ||
restart: unless-stopped | ||
ports: | ||
- "6157:6157" # HTTP port | ||
- "2222:2222" # SSH port, can be removed if you don't use SSH | ||
volumes: | ||
- "$HOME/.opengist:/opengist" | ||
environment: | ||
OG_SQLITE_JOURNAL_MODE: WAL | ||
# other configuration options | ||
``` |