mirror of
https://github.com/mvvasilev/findtheti.me.git
synced 2025-04-19 13:39:52 +03:00
Update readme
This commit is contained in:
parent
88f451a007
commit
88f924cbb9
1 changed files with 51 additions and 15 deletions
64
README.md
64
README.md
|
@ -22,20 +22,26 @@ docker run
|
||||||
```sh
|
```sh
|
||||||
docker run
|
docker run
|
||||||
-e DATABASE_URL='postgresql://{postgres user}:{postgres password}@{postgres host}/{postgres database}'
|
-e DATABASE_URL='postgresql://{postgres user}:{postgres password}@{postgres host}/{postgres database}'
|
||||||
|
-e HTTP_PORT=8080
|
||||||
|
-e SSL_PORT=8443
|
||||||
-e SSL_ENABLED='true'
|
-e SSL_ENABLED='true'
|
||||||
-v /data/findtheti-me/certs:/etc/findtheti-me/certs # Place your cert files in /data/findtheti-me/certs and ensure they have permissions of at least 644
|
-v /data/findtheti-me/certs:/etc/findtheti-me/certs # Place your cert files in /data/findtheti-me/certs
|
||||||
-p {http port to run on}:8080 # if SSL_REDIRECT=false, this can be skipped
|
-p {http port to run on}:8080 # if SSL_REDIRECT=false, this can be skipped. If enabled, ensure the SSL_PORT is configured the same as it is exposed.
|
||||||
-p {ssl port to run on}:8443
|
-p 8443:8443 # See above
|
||||||
mvv97/findthetime:latest
|
mvv97/findthetime:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
### Example docker-compose.yml
|
Ensure the cert files are owned by user:group `10001:10001`, as those correspond to the container user.
|
||||||
|
|
||||||
|
#### Example docker-compose.yml w/ SSL
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
version: "3.4"
|
version: '3.4'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
postgresql:
|
postgresql:
|
||||||
|
container_name: ftt_db
|
||||||
image: "docker.io/library/postgres:16-alpine"
|
image: "docker.io/library/postgres:16-alpine"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -49,17 +55,48 @@ services:
|
||||||
image: "docker.io/mvv97/findthetime:latest"
|
image: "docker.io/mvv97/findthetime:latest"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
DATABASE_URL: "postgres://${PG_USER:-findthetime}:${PG_PASS}@postgresql/${PG_DB:-findthetime}"
|
DATABASE_URL: "postgres://${PG_USER:-findthetime}:${PG_PASS}@ftt_db/${PG_DB:-findthetime}"
|
||||||
SSL_ENABLED: 'true' # when this is set to false ( default ), the ssl port is not listened to.
|
LOG_LEVEL: 'debug'
|
||||||
SSL_REDIRECT: 'true'
|
HTTP_PORT: '8114'
|
||||||
SSL_PORT: '8443'
|
SSL_ENABLED: 'true'
|
||||||
SSL_CERT_PATH: '/etc/findtheti-me/certs/server.cert'
|
SSL_PORT: '8115'
|
||||||
SSL_KEY_PATH: '/etc/findtheti-me/certs/server.key'
|
SSL_CERT_PATH: '/etc/findtheti-me/certs/fullchain.pem'
|
||||||
|
SSL_KEY_PATH: '/etc/findtheti-me/certs/privkey.pem'
|
||||||
volumes:
|
volumes:
|
||||||
- '/data/findtheti-me/certs:/etc/findtheti-me/certs'
|
- '/data/findtheti-me/certs:/etc/findtheti-me/certs'
|
||||||
ports:
|
ports:
|
||||||
- '8080:8080'
|
- '8114:8114'
|
||||||
- '8443:8443'
|
- '8115:8115'
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Example docker-compose.yml w/o SSL
|
||||||
|
|
||||||
|
```yml
|
||||||
|
version: '3.4'
|
||||||
|
|
||||||
|
services:
|
||||||
|
|
||||||
|
postgresql:
|
||||||
|
container_name: ftt_db
|
||||||
|
image: "docker.io/library/postgres:16-alpine"
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- '/data/findtheti-me/postgres_data:/var/lib/postgresql/data'
|
||||||
|
environment:
|
||||||
|
POSTGRES_PASSWORD: ${PG_PASS:?database password required}
|
||||||
|
POSTGRES_USER: ${PG_USER:-findthetime}
|
||||||
|
POSTGRES_DB: ${PG_DB:-findthetime}
|
||||||
|
|
||||||
|
findthetime:
|
||||||
|
image: "docker.io/mvv97/findthetime:latest"
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
DATABASE_URL: "postgres://${PG_USER:-findthetime}:${PG_PASS}@ftt_db/${PG_DB:-findthetime}"
|
||||||
|
LOG_LEVEL: 'debug'
|
||||||
|
HTTP_PORT: '8114'
|
||||||
|
SSL_ENABLED: 'false'
|
||||||
|
ports:
|
||||||
|
- '8114:8114'
|
||||||
```
|
```
|
||||||
|
|
||||||
Ensure you have the necessary environment variables configured: `PG_DB`, `PG_USER` and `PG_PASS`.
|
Ensure you have the necessary environment variables configured: `PG_DB`, `PG_USER` and `PG_PASS`.
|
||||||
|
@ -86,7 +123,6 @@ Finally, run `./findtheti-me` in the root, and the application should start.
|
||||||
|
|
||||||
In order to enable SSL, configure `SSL_ENABLED=true`, `SSL_PORT` with the desired port ( `8443` by default ), and `SSL_CERT_PATH` and `SSL_KEY_PATH`
|
In order to enable SSL, configure `SSL_ENABLED=true`, `SSL_PORT` with the desired port ( `8443` by default ), and `SSL_CERT_PATH` and `SSL_KEY_PATH`
|
||||||
with the paths to your certificate and key files ( `/etc/letsencrypt/live/your.domain/cert.pem` and `/etc/letsencrypt/live/your.domain/key.pem`, for example ).
|
with the paths to your certificate and key files ( `/etc/letsencrypt/live/your.domain/cert.pem` and `/etc/letsencrypt/live/your.domain/key.pem`, for example ).
|
||||||
Ensure the permissions of these files are at least `644`, as the container user will need to be able to read them.
|
|
||||||
|
|
||||||
**Note that there is currently no support for encrypted private keys ( those that start with `-----BEGIN ENCRYPTED PRIVATE KEY-----`).
|
**Note that there is currently no support for encrypted private keys ( those that start with `-----BEGIN ENCRYPTED PRIVATE KEY-----`).
|
||||||
Attempting to use such will be met with the error:**
|
Attempting to use such will be met with the error:**
|
||||||
|
|
Loading…
Add table
Reference in a new issue