Skip to content

Commit

Permalink
Adapt docker-compose files, change host option
Browse files Browse the repository at this point in the history
  • Loading branch information
Morphenoed committed Oct 20, 2024
1 parent a36df56 commit a156759
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 26 deletions.
8 changes: 8 additions & 0 deletions docs/docs/assets/dev/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,13 @@ services:
networks:
- tms_dev_db

gotenberg:
container_name: gotenberg
image: gotenberg/gotenberg:8
ports:
- '2000:3000'
networks:
- tms_dev_db

networks:
tms_dev_db:
11 changes: 8 additions & 3 deletions docs/docs/assets/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ services:
image: ghcr.io/dudrie/tutor-management-system:<version>
container_name: tms-server
restart: on-failure:1
cap_add:
# This one is needed so puppeteer properly works inside the container (see: https://developers.google.com/web/tools/puppeteer/troubleshooting#tips)
- SYS_ADMIN
depends_on:
- mysql
networks:
Expand All @@ -43,6 +40,14 @@ services:
# Replace with the path to the folder containing the configuration and template files of the TMS.
- <path-to-CONFIG>:/tms/server/config

gotenberg:
container_name: gotenberg
image: gotenberg/gotenberg:8
ports:
- '2000:3000'
networks:
- tms_db

volumes:
db_data:

Expand Down
8 changes: 8 additions & 0 deletions scripts/build-test-docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ services:
volumes:
- ./config:/tms/server/config

gotenberg:
container_name: gotenberg
image: gotenberg/gotenberg:8
ports:
- '2000:3000'
networks:
- tms_db

volumes:
db_data:

Expand Down
22 changes: 11 additions & 11 deletions server/config/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ handbookUrl: 'https://dudrie.github.io/Tutor-Management-System/'

# Configuration for the database access. More information can be found in the documentation.
database:
host: localhost
port: 3306
databaseName: tms-big-db
maxRetries: 2
reconnectTimeout: 10000
host: localhost
port: 3306
databaseName: tms-big-db
maxRetries: 2
reconnectTimeout: 10000

defaultSettings:
canTutorExcuseStudents: true
defaultTeamSize: 3
canTutorExcuseStudents: true
defaultTeamSize: 3

# Settings used for the gotenberg instance
gotenberg:
host: 'http://localhost'
port: 2000
# Timeout in ms
timeout: 30000
host: localhost
port: 2000
# Timeout in ms
timeout: 30000
22 changes: 11 additions & 11 deletions server/config/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ handbookUrl: 'https://dudrie.github.io/Tutor-Management-System/'

# Configuration for the database access. More information can be found in the documentation.
database:
host: tms_sql
port: 3306
databaseName: tms-db
maxRetries: 2
reconnectTimeout: 10000
host: tms_sql
port: 3306
databaseName: tms-db
maxRetries: 2
reconnectTimeout: 10000

defaultSettings:
canTutorExcuseStudents: true
defaultTeamSize: 3
canTutorExcuseStudents: true
defaultTeamSize: 3

# Settings used for the gotenberg instance
gotenberg:
host: 'http://localhost'
port: 2000
# Timeout in ms
timeout: 30000
host: gotenberg
port: 3000
# Timeout in ms
timeout: 30000
2 changes: 1 addition & 1 deletion server/src/module/pdf/subservices/PDFGenerator.core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export abstract class PDFGenerator<T = Record<string, unknown>> {
this.logger.debug('Sending request to Gotenberg for PDF generation...');

const response = await axios.post(
`${gotenbergConfig?.host}:${gotenbergConfig?.port}/forms/chromium/convert/html`,
`http://${gotenbergConfig?.host}:${gotenbergConfig?.port}/forms/chromium/convert/html`,
form,
{
headers: {
Expand Down

0 comments on commit a156759

Please sign in to comment.