-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
provide docker compose configurations and describe setup
- Loading branch information
Showing
14 changed files
with
582 additions
and
11 deletions.
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
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 |
---|---|---|
|
@@ -38,7 +38,7 @@ yarn-error.log* | |
*.tsbuildinfo | ||
next-env.d.ts | ||
|
||
.env | ||
/.env | ||
!next-env.d.ts | ||
|
||
/media | ||
|
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
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,32 @@ | ||
## Docker compose configurations | ||
This directory provide basic docker compose configurations to setup and start a cv-manager instance. Please adapt configurations to your needs. | ||
Next to the docker compose file, a default `.env` file is provided. Please read in the [configuration section](https://github.com/tegonal/cv-manager/blob/main/README.md#Configuration) how to adapt those properties. | ||
|
||
### Postgres | ||
Ready to use setup with postgres database adapter and starting the following docker images: | ||
* caddy as proxy server with self-signed certificates | ||
* postgres | ||
* gotenberg | ||
* pgadmin (optional) | ||
* pgbackup (optional) | ||
* cv-manager | ||
|
||
#### Secrets | ||
Adjust at least the following secrets in the `.env` file to ensure you're running the instance with your own secrets: | ||
* `PAYLOAD_SECRET` | ||
* `PRINTER_SECRET` | ||
* `S3_SECRET_ACCESS_KEY` | ||
* `S3_ACCESS_KEY_ID` | ||
* `MINIO_ROOT_PASSWORD` | ||
|
||
#### Accessible URL | ||
Adjust the `NEXT_PUBLIC_URL` to the URL under which the instance should be accessible and define the same hostname in the `Caddyfile` configuration. | ||
|
||
### Run the application | ||
Start the docker image in the desired directory: | ||
``` | ||
docker compose up -f | ||
``` | ||
|
||
Access | ||
|
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,58 @@ | ||
# -- Require configuration | ||
|
||
# Please specify strong secrets for the following parms | ||
PAYLOAD_SECRET=secret | ||
PRINTER_SECRET=secret | ||
|
||
# Configure for you public deployment, defaults to http://localhost:3000 | ||
# Doesn't work with gotenbergs demo instance if not pointing to a public visible url | ||
NEXT_PUBLIC_URL=http://localhost:3000 | ||
|
||
# -- Optional configuration | ||
|
||
# Generating the PDF documents relies on a running Gotenberg instance. For demo purposes there exist an online | ||
# demo of the gotenberg project itself. Please provide your own instance (https://gotenberg.dev/docs/getting-started/installation) | ||
# and configure it accordingly | ||
GOTENBERG_PDF_URL=http://localhost:3030 | ||
|
||
# Provide a custom database URI. Supported protocols are | ||
# postgres:// for Postgres databases | ||
# mongodb:// for MongoDB databases | ||
# file:// for SQLite databases | ||
# Defaults to file:///tmp/cv_manager.db if not specified | ||
DATABASE_URI=postgres://postgres:postgres@localhost:5432/tegonal-cv | ||
|
||
# Use this flag with caution. This will prevent checking existence of PRINTER_SECRET in header. Use for local debug mode only | ||
# ALLOW_UNSECURED_CV_ACCESS=false | ||
|
||
# Uncomment if you want to connect to an S3 storage to store media files | ||
S3_ENDPOINT=http://localhost:9000 | ||
S3_BUCKET=tegonal-cv | ||
S3_SECRET_ACCESS_KEY=secret1234 | ||
S3_ACCESS_KEY_ID=secret1234 | ||
|
||
# Uncomment if you want to configure an integration to an oauth client | ||
# OAUTH_CLIENT_ID=secret | ||
# OAUTH_CLIENT_SECRET=secret | ||
# OAUTH_TOKEN_ENDPOINT=http://localhost:8080/oauth/token | ||
# OAUTH_AUTHORIZE_ENDPOINT=http://localhost:8080/oauth/authorize | ||
# OAUTH_USERINFO_ENDPOINT=http://localhost:8080/oauth/userinfo | ||
|
||
# Uncomment to be able to send out passwort reset emails, otherwise messages are written to the console log | ||
SMTP_FROM_ADDRESS=[email protected] | ||
SMTP_HOST=localhost | ||
SMTP_PORT=1025 | ||
SMTP_USER=smtpuser | ||
SMTP_PASS=smtppwd | ||
|
||
# -- PDF layouting options, only required if you're using the default layout | ||
# Company name used in default page | ||
DEFAULT_PAGE_COMPANY_NAME=MyCompany | ||
DEFAULT_PAGE_COMPANY_ADDRESS=Homestreet 20 | ||
DEFAULT_PAGE_COMPANY_CITY=3000 Bern | ||
DEFAULT_PAGE_COMPANY_URL=https://github.com/tegonal | ||
|
||
# Provide custom logo in the public folder | ||
DEFAULT_PAGE_COMPANY_LOGO=logo.png | ||
DEFAULT_PAGE_COMPANY_LOGO_WIDTH=20 | ||
DEFAULT_PAGE_COMPANY_LOGO_HEIGHT=20 |
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,89 @@ | ||
name: tegonal-cv | ||
|
||
services: | ||
|
||
mongodb: | ||
image: mongo:8.0 | ||
ports: | ||
- "27017:27017" | ||
environment: | ||
MONGO_INITDB_ROOT_USERNAME: root | ||
MONGO_INITDB_ROOT_PASSWORD: root | ||
volumes: | ||
- mongodb-data:/data/db | ||
|
||
minio: | ||
image: minio/minio:latest | ||
ports: | ||
- "9000:9000" | ||
- "9001:9001" | ||
environment: | ||
MINIO_ROOT_USER: secret1234 | ||
MINIO_ROOT_PASSWORD: secret1234 | ||
volumes: | ||
- minio-data:/data | ||
command: server --console-address ":9001" /data | ||
|
||
createbucket: | ||
image: minio/mc | ||
depends_on: | ||
- minio | ||
entrypoint: > | ||
/bin/sh -c " | ||
/usr/bin/mc alias set myminio http://minio:9000 secret1234 secret1234; | ||
/usr/bin/mc mb myminio/tegonal-cv; | ||
exit 0; | ||
" | ||
mailpit: | ||
image: axllent/mailpit | ||
restart: unless-stopped | ||
volumes: | ||
- mailpit-data:/data | ||
ports: | ||
- 8025:8025 | ||
- 1025:1025 | ||
environment: | ||
MP_MAX_MESSAGES: 100 | ||
MP_DATABASE: /data/mailpit.db | ||
MP_SMTP_AUTH_ACCEPT_ANY: 1 | ||
MP_SMTP_AUTH_ALLOW_INSECURE: 1 | ||
|
||
gotenberg: | ||
image: gotenberg/gotenberg:8.15 | ||
container_name: gotenberg | ||
command: | ||
- "gotenberg" | ||
- "--libreoffice-auto-start=false" | ||
- "--libreoffice-disable-routes=true" | ||
- "--chromium-auto-start=true" | ||
- "--chromium-ignore-certificate-errors=true" | ||
- "--chromium-clear-cache=true" | ||
- "--prometheus-disable-collect=true" | ||
- "--webhook-disable=true" | ||
- "--pdfengines-disable-routes=true" | ||
- "--api-port=3030" | ||
environment: | ||
- "TZ=Europe/Zurich" | ||
ports: | ||
- "3030:3030" | ||
healthcheck: | ||
test: [ "CMD", "curl", "-f", "http://localhost:3030/health" ] | ||
interval: 30s | ||
timeout: 20s | ||
retries: 3 | ||
network_mode: "host" | ||
|
||
cvmanager: | ||
image: tegonal/cv-manager:latest | ||
container_name: cv-manager | ||
|
||
volumes: | ||
mailpit-data: | ||
driver: local | ||
minio-data: | ||
driver: local | ||
pgadmin-data: | ||
driver: local | ||
mongodb-data: | ||
driver: local |
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,87 @@ | ||
# -- Require configuration | ||
|
||
# Please specify strong secrets for the following parms | ||
PAYLOAD_SECRET=secret | ||
PRINTER_SECRET=secret | ||
|
||
# Configure for you public deployment, defaults to http://localhost:3000 | ||
# Doesn't work with gotenbergs demo instance if not pointing to a public visible url | ||
NEXT_PUBLIC_URL=https://localhost | ||
|
||
# -- Optional configuration | ||
|
||
# Generating the PDF documents relies on a running Gotenberg instance. For demo purposes there exist an online | ||
# demo of the gotenberg project itself. Please provide your own instance (https://gotenberg.dev/docs/getting-started/installation) | ||
# and configure it accordingly | ||
GOTENBERG_PDF_URL=http://gotenberg:3000 | ||
|
||
# Provide a custom database URI. Supported protocols are | ||
# postgres:// for Postgres databases | ||
# mongodb:// for MongoDB databases | ||
# file:// for SQLite databases | ||
# Defaults to file:///tmp/cv_manager.db if not specified | ||
DATABASE_URI=postgres://postgres:postgres@postgres:5432/cv-manager | ||
POSTGRES_USER=postgres | ||
POSTGRES_PASSWORD=postgres | ||
POSTGRES_DB=cv-manager | ||
|
||
# Use this flag with caution. This will prevent checking existence of PRINTER_SECRET in header. Use for local debug mode only | ||
# ALLOW_UNSECURED_CV_ACCESS=false | ||
|
||
# Uncomment if you want to connect to an S3 storage to store media files | ||
S3_ENDPOINT=http://minio:9000 | ||
S3_BUCKET=cv-manager | ||
S3_SECRET_ACCESS_KEY=secret1234 | ||
S3_ACCESS_KEY_ID=secret1234 | ||
|
||
# Uncomment if you want to configure an integration to an oauth client | ||
# OAUTH_CLIENT_ID=secret | ||
# OAUTH_CLIENT_SECRET=secret | ||
# OAUTH_TOKEN_ENDPOINT=http://localhost:8080/oauth/token | ||
# OAUTH_AUTHORIZE_ENDPOINT=http://localhost:8080/oauth/authorize | ||
# OAUTH_USERINFO_ENDPOINT=http://localhost:8080/oauth/userinfo | ||
|
||
# Uncomment to be able to send out passwort reset emails, otherwise messages are written to the console log | ||
# [email protected] | ||
# SMTP_HOST=localhost | ||
# SMTP_PORT=1025 | ||
# SMTP_USER=smtpuser | ||
# SMTP_PASS=smtppwd | ||
|
||
# -- PDF layouting options, only required if you're using the default layout | ||
# Company name used in default page | ||
DEFAULT_PAGE_COMPANY_NAME=MyCompany | ||
DEFAULT_PAGE_COMPANY_ADDRESS=Homestreet 20 | ||
DEFAULT_PAGE_COMPANY_CITY=3000 Bern | ||
DEFAULT_PAGE_COMPANY_URL=https://github.com/tegonal/cv-manager | ||
|
||
# Provide custom logo in the public folder | ||
DEFAULT_PAGE_COMPANY_LOGO=logo.png | ||
DEFAULT_PAGE_COMPANY_LOGO_WIDTH=20 | ||
DEFAULT_PAGE_COMPANY_LOGO_HEIGHT=20 | ||
|
||
|
||
# Postgres backup configuration | ||
# DB_TYPE=pgsql | ||
# DB_HOST=postgres | ||
# DB_NAME=ALL | ||
# DB_PORT=5432 | ||
# DB_USER=postgres | ||
# DB_PASS=postgres | ||
# DB_DUMP_FREQ=1440 | ||
# #DB_DUMP_BEGIN=0000 # <== Uncomment to set a specific time to start the backup, otherwise it will run immediately | ||
# DB_CLEANUP_TIME=8640 | ||
|
||
# Postgres Admin configuration | ||
# PGADMIN_DEFAULT_EMAIL= | ||
# PGADMIN_DEFAULT_PASSWORD= | ||
|
||
# MinIO configuration | ||
MINIO_ROOT_USER=cv-manager | ||
# Provide a custom password | ||
MINIO_ROOT_PASSWORD=234rfdsklfmew90r23rmwpef23r23rwedf | ||
|
||
# Volume backup configuration | ||
BACKUP_FILENAME="volume-backup-%Y-%m-%dT%H-%M-%S.tar.gz" | ||
BACKUP_LATEST_SYMLINK="volume-backup.latest.tar.gz" | ||
BACKUP_RETENTION_DAYS="7" |
Oops, something went wrong.