diff --git a/.env.example b/.env.example index adbec32fc..7a86ab280 100644 --- a/.env.example +++ b/.env.example @@ -51,6 +51,10 @@ SIGNUP_ALLOWED_EMAILS= # API rate limit (points,duration,block duration). API_RATE_LIMIT=120,60,600 -# Gotenberg API for PDF printing. -GOTENBERG_URL=http://localhost:9000 -GOTENBERG_DOCS_URL=http://host.docker.internal:3000/public/ \ No newline at end of file +# Gotenberg API for PDF printing - (production). +GOTENBERG_URL=http://gotenberg:3000 +GOTENBERG_DOCS_URL=http://server:3000/public/ + +# Gotenberg API - (development) +# GOTENBERG_URL=http://gotenberg:3000 +# GOTENBERG_DOCS_URL=http://server:3000/public/ \ No newline at end of file diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 21e9f74c2..760bab69c 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -35,6 +35,8 @@ services: server: container_name: bigcapital-server image: ghcr.io/bigcapitalhq/server:latest + expose: + - '3000' links: - mysql - mongo @@ -86,6 +88,10 @@ services: - SIGNUP_ALLOWED_DOMAINS=${SIGNUP_ALLOWED_DOMAINS} - SIGNUP_ALLOWED_EMAILS=${SIGNUP_ALLOWED_EMAILS} + # Gotenberg (Pdf generator) + - GOTENBERG_URL=${GOTENBERG_URL} + - GOTENBERG_DOCS_URL=${GOTENBERG_DOCS_URL} + database_migration: container_name: bigcapital-database-migration build: @@ -143,6 +149,11 @@ services: volumes: - redis:/data + gotenberg: + image: gotenberg/gotenberg:7 + expose: + - '9000' + # Volumes volumes: mysql: diff --git a/packages/server/.gitignore b/packages/server/.gitignore index a0408e05b..12cb973dd 100644 --- a/packages/server/.gitignore +++ b/packages/server/.gitignore @@ -1,6 +1,5 @@ /node_modules/ /.env -/storage stdout.log /dist /build diff --git a/packages/server/storage/.gitignore b/packages/server/storage/.gitignore new file mode 100644 index 000000000..8a4307f28 --- /dev/null +++ b/packages/server/storage/.gitignore @@ -0,0 +1,3 @@ +* +!pdf/ +!.gitignore \ No newline at end of file diff --git a/packages/server/storage/pdf/.gitignore b/packages/server/storage/pdf/.gitignore new file mode 100644 index 000000000..c96a04f00 --- /dev/null +++ b/packages/server/storage/pdf/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore \ No newline at end of file