Skip to content

Commit a156759

Browse files
committed
Adapt docker-compose files, change host option
1 parent a36df56 commit a156759

6 files changed

Lines changed: 47 additions & 26 deletions

File tree

docs/docs/assets/dev/docker-compose.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,13 @@ services:
2222
networks:
2323
- tms_dev_db
2424

25+
gotenberg:
26+
container_name: gotenberg
27+
image: gotenberg/gotenberg:8
28+
ports:
29+
- '2000:3000'
30+
networks:
31+
- tms_dev_db
32+
2533
networks:
2634
tms_dev_db:

docs/docs/assets/docker-compose.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ services:
2727
image: ghcr.io/dudrie/tutor-management-system:<version>
2828
container_name: tms-server
2929
restart: on-failure:1
30-
cap_add:
31-
# This one is needed so puppeteer properly works inside the container (see: https://developers.google.com/web/tools/puppeteer/troubleshooting#tips)
32-
- SYS_ADMIN
3330
depends_on:
3431
- mysql
3532
networks:
@@ -43,6 +40,14 @@ services:
4340
# Replace with the path to the folder containing the configuration and template files of the TMS.
4441
- <path-to-CONFIG>:/tms/server/config
4542

43+
gotenberg:
44+
container_name: gotenberg
45+
image: gotenberg/gotenberg:8
46+
ports:
47+
- '2000:3000'
48+
networks:
49+
- tms_db
50+
4651
volumes:
4752
db_data:
4853

scripts/build-test-docker/docker-compose.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ services:
2828
volumes:
2929
- ./config:/tms/server/config
3030

31+
gotenberg:
32+
container_name: gotenberg
33+
image: gotenberg/gotenberg:8
34+
ports:
35+
- '2000:3000'
36+
networks:
37+
- tms_db
38+
3139
volumes:
3240
db_data:
3341

server/config/development.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ handbookUrl: 'https://dudrie.github.io/Tutor-Management-System/'
99

1010
# Configuration for the database access. More information can be found in the documentation.
1111
database:
12-
host: localhost
13-
port: 3306
14-
databaseName: tms-big-db
15-
maxRetries: 2
16-
reconnectTimeout: 10000
12+
host: localhost
13+
port: 3306
14+
databaseName: tms-big-db
15+
maxRetries: 2
16+
reconnectTimeout: 10000
1717

1818
defaultSettings:
19-
canTutorExcuseStudents: true
20-
defaultTeamSize: 3
19+
canTutorExcuseStudents: true
20+
defaultTeamSize: 3
2121

2222
# Settings used for the gotenberg instance
2323
gotenberg:
24-
host: 'http://localhost'
25-
port: 2000
26-
# Timeout in ms
27-
timeout: 30000
24+
host: localhost
25+
port: 2000
26+
# Timeout in ms
27+
timeout: 30000

server/config/production.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ handbookUrl: 'https://dudrie.github.io/Tutor-Management-System/'
99

1010
# Configuration for the database access. More information can be found in the documentation.
1111
database:
12-
host: tms_sql
13-
port: 3306
14-
databaseName: tms-db
15-
maxRetries: 2
16-
reconnectTimeout: 10000
12+
host: tms_sql
13+
port: 3306
14+
databaseName: tms-db
15+
maxRetries: 2
16+
reconnectTimeout: 10000
1717

1818
defaultSettings:
19-
canTutorExcuseStudents: true
20-
defaultTeamSize: 3
19+
canTutorExcuseStudents: true
20+
defaultTeamSize: 3
2121

2222
# Settings used for the gotenberg instance
2323
gotenberg:
24-
host: 'http://localhost'
25-
port: 2000
26-
# Timeout in ms
27-
timeout: 30000
24+
host: gotenberg
25+
port: 3000
26+
# Timeout in ms
27+
timeout: 30000

server/src/module/pdf/subservices/PDFGenerator.core.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export abstract class PDFGenerator<T = Record<string, unknown>> {
3939
this.logger.debug('Sending request to Gotenberg for PDF generation...');
4040

4141
const response = await axios.post(
42-
`${gotenbergConfig?.host}:${gotenbergConfig?.port}/forms/chromium/convert/html`,
42+
`http://${gotenbergConfig?.host}:${gotenbergConfig?.port}/forms/chromium/convert/html`,
4343
form,
4444
{
4545
headers: {

0 commit comments

Comments
 (0)