54 Commits

Author SHA1 Message Date
Iain Sproat 18265b6278 feat(server/emails): support require TLS configuration option EMAIL_REQUIRE_TLS (#5425) 2025-09-12 12:06:25 +01:00
Iain Sproat a0f23dcefe fix(server/email): emails configuration is secure by default but can be overridden (#5417) 2025-09-11 17:06:36 +01:00
Jedd Morgan 452e691a7c feat(ifc-import-service): update speckleifc (#5385)
* update speckleifc

* fix python call

* Update docker compose file for new import service

* fabians startup py script

* revert lock

* EOF and renamed scripts

* Revert lock fully this time

* Added importer envs  to example.env

* small typo

* fix mistake

* remove docker envvars
2025-09-05 14:20:10 +01:00
Niklas 39e377fbea Fix speckle-server health check. (#5235) 2025-08-14 11:45:25 +01:00
Iain Sproat d0e3377978 feat(file uploads): large file uploads API is always available (#5103) 2025-07-23 13:36:27 +01:00
Iain Sproat 556c2791b3 feat(file imports): large file uploads now work on docker compose (#5037) 2025-07-07 11:00:55 +01:00
Iain Sproat 65a1c0228c fix(docker compose): add redis url to docker compose environment variables (#4946) 2025-06-16 11:57:34 +01:00
Iain Sproat 55cffc3782 ci(docker): tidy dockerfiles with aim to increase cache hits (#4819) 2025-06-09 16:54:24 +01:00
Iain Sproat dae238f705 feat(fileimport service): allow dedicated Redis server for queue (#4858) 2025-06-03 08:55:54 +01:00
Iain Sproat 2dc32094d0 feat(helm chart): can be configured to deploy preview service in cluster 2025-03-15 11:31:40 +00:00
Iain Sproat 6e170d0c4f fix(docker compose): preview service can be used with docker compose 2025-03-15 10:43:40 +00:00
Iain Sproat ec98f8d4cb chore(fe1): remove deprecated frontend (#3998)
---------

Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
2025-02-18 12:36:52 +00:00
Iain Sproat a22a350627 chore(dockerfile): move to distroless (#2885) (#2897)
* Reapply "chore(dockerfile): move to distroless  (#2885)" (#2888)

This reverts commit 9d8cd0f351.

* Fix startup probe for objects pods
2024-09-06 09:43:35 +01:00
Iain Sproat 206b2368ba fix(preview-service): listen externally on metrics port (#2893) 2024-09-05 16:50:23 +01:00
Iain Sproat 9d8cd0f351 Revert "chore(dockerfile): move to distroless (#2885)" (#2888)
This reverts commit a1a3428737.
2024-09-05 15:03:47 +01:00
Iain Sproat a1a3428737 chore(dockerfile): move to distroless (#2885)
* chore(dockerfile): move to distroless
- remove unnecessary env vars (these are provided via the deployment system)
- uses relative paths if in a working directory

* Amend entrypoint for use with distroless

* Update startup probe & docker compose readiness probe
2024-09-05 14:28:26 +01:00
Iain Sproat d32e3c0a71 chore(CI): temporarily disable docker compose deployment test & other fixes for race condition in docker compose deployment test (#2553) 2024-08-01 12:15:35 +01:00
Iain Sproat 7e6f31ad66 chore(health): add dedicated liveness and readiness endpoints (#1987)
* chore(health): add dedicated liveness and readiness endpoints
- provides more flexibility in defining what constitutes readiness and liveness
* add tests for /liveness and /readiness
* Prevent liveness and readiness endpoints being exposed externally by redirecting their routes
2024-06-18 12:49:03 +01:00
Alexandru Popovici 8550d3f762 preview-generation service Fix (#2311)
* Fix for broken preview-generation service running inside a docker image

* Reverted some possible dubious changes
2024-05-31 18:22:29 +03:00
Iain Sproat 80fbc70692 chore(docker compose): fe2 should have warn level of logs by default (#2059) 2024-02-20 19:07:52 +00:00
andrewwallacespeckle ff6433128a FE2 - Embedding (#1979)
* Add Dialog

* Add options to embed dialog

* Min Height of Clipboard Input multiline to 3 lines

* Check for visibility

* Link to change access of project

* Rename to guided mode

* Change icon when user clicks copy button

* Update Menu styles based on agi feedback

* Update graphql.ts

* Embed Options as hashState

* Auto grow Clipboard Input

* embed state and more options

* Tidyups

* Footer only shows when !embedOptions.isTransparent

* Add auto/manual Load

* Add Pre setup component

* WIP Button Group mobile

* Updates around manual load

* Viewer Share nav

* Add embed dialog to project page

* Minor fixes

* Check for federated

* Responsive Tidyups

* Responsive Fixes. Fix console issues

* Add Alert to Version Embed

* Disable Zoom

* GQL updates

* Comment Slideshow

* GraphQl changes

* Fix visibility

* Build fix

* Revert "Build fix"

This reverts commit 0e706cbd9fde78204032bb1ec4421b1742d023ac.

* remove unneeded change, revert yarn.lock

* Test Commit

* Remove commit test

* Fix build

* Update Tailwind. Add base url env

* fix for portal scope issue

* useLogger

* useLogger

* chore(fe2): include NUXT_PUBLIC_BASE_URL in deployment manifests

* lazy load optimization

* lint fixes

* Updates

* Re-add guided open Dialog sections

* Prevent login popup on embed

* Tidy up mobile combined button group

* Tidy up embed Dialogs

* Small styling issues

* Update scrolling in embed dialog

* Move selection info when embed

* Testing fixes

* Discuss in Speckle

* Responsive Dialog Changes

* Fix bug

* WIP Manual Load

* Fix nuxt errors

* Fix nuxt logger issue

* Fix embed dialog overflows

* New Dialog layout

* Responsive Breakpoint change

* Preview Image

* Fix bug with dialogSection

* Hide selection info on mobile when thread is open

* Footer Model Name

* Overflow on ClipboardInput

* Style fixes

* Tidy ups

* Responsive updates

* Responsive fixes

* Update button

* Changes from testing

* Fix embed height with footer

* Fix Dialog Section

* Fixes from testing

* Move "reset filters" on embed

* Small fixes

* Updates from CR 1

* CR Comments 2

* Updates from CR

* Add deserializeEmbedOptions helper

* DialogSection changes

* Revert changes in TextArea

* Updates from CR

* Only check for noscroll in watch

* Update useRoute

* Comment Slideshow mode

* Changes from testing

* Fix mobile share button

* onMounted warn fixes

* Updates from testing

* Remove nesting of ManualLoad

* Keep Speckle text on mobile

* minor cleanup & bugfixes

* Add target prop to Logo

* navbar flash fix + more cleanup

* Fix urls

* Footer Logo changes

* Remove viewer-transparent from layout

* Add Reply in Speckle

* Remove Anchored Points from embed

* Final changes pre CR

* Fix Anchored Points

* Update packages/frontend-2/components/project/model-page/dialog/embed/Embed.vue

Co-authored-by: Kristaps Fabians Geikins <fabians@speckle.systems>

* Fixes from CR

* Updates from cr

* Changes WIP

* Fix for dialog opening

* Changes from PR

* Updates to check embed in activity

* fix(fe2): project settings dialog error

* Make Team open section on click of "Manage"

* Fixes from merge

* Changes from cr

* Compare old to new in watch

* Fix logo in footer of embed

* Fixes from merge

* Fix build. Fix lazy load

* Updates from Benjamin

* Fix transparent bg

---------

Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
Co-authored-by: Iain Sproat <68657+iainsproat@users.noreply.github.com>
Co-authored-by: Kristaps Fabians Geikins <fabians@speckle.systems>
2024-02-06 10:38:22 +00:00
Kristaps Fabians Geikins c3f13d4e66 fix: multiple FE2 and server speed improvements, mainly focusing on the project page (#1975)
* introduced app cache & optimized /downloads

* added redis cache storage

* optimizing latest thread retrieval

* more dataloaders

* undid debug stuff

* deployment changes

* minor change to reqTouched

* connectorTag parallel resolution

* added redis key prefix

* gqlgen cleanup

* Amend network policy to allow egress to Redis

---------

Co-authored-by: Iain Sproat <68657+iainsproat@users.noreply.github.com>
2024-01-22 11:08:53 +02:00
Iain Sproat d753a92a5c feat(frontend-2): deploy fe2 as default on docker-compose environments (#1880)
* feat(frontend-2): deploy to docker-compose environment
- including DigitalOcean 1-click environments
- local docker compose environment deploys an nginx ingress
- builds and publishes docker-compose-ingress via CircleCI
- sets platform variable for ensuring correct runtime is built
- frontend-2 should connect to speckle server directly within the docker compose network

---------

Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
2023-11-29 09:16:58 +00:00
Iain Sproat 7bad5abed6 Revert "MAX_OBJECT_SIZE_MB should be configurable in the fileimport service (#1837)" (#1838)
This reverts commit 4973622c18.
2023-10-26 16:24:18 +01:00
Iain Sproat 4973622c18 MAX_OBJECT_SIZE_MB should be configurable in the fileimport service (#1837)
* fix(helm chart): fileimport service maximum object size should match server
- allow maximum object size to be configurable and to match the server value

* Explicitly provide the environment variable to docker-compose
- this indicates to operators of clusters that this environment variable exists and can be configured
2023-10-26 15:53:55 +01:00
Gergő Jedlicska ad0228c434 fix(monorepo): make sure to use 127.0.0.1 instead of localhost 2023-08-03 10:28:57 +02:00
Iain Sproat f568f54266 **Breaking Change**: fix(email): from address must be provided by operator if email is enabled (#1743) (#1745)
This reverts commit 0a795c51f2.
2023-08-01 11:49:08 +01:00
Iain Sproat 0a795c51f2 Revert "**Breaking Change**: fix(email): from address must be provided by operator if email is enabled (#1743)" (#1744)
This reverts commit 3f9dd5f914.
2023-08-01 10:13:54 +01:00
Iain Sproat 3f9dd5f914 **Breaking Change**: fix(email): from address must be provided by operator if email is enabled (#1743)
* fix(email): from address should be an example to be configured by operator

* fix(environment variable): should be 'EMAIL_FROM'
- also uses docker_image_tag of '2', which should be latest in '2' tags

* No sensible defaults, instead validate that it is configured
2023-07-31 17:37:06 +01:00
Iain Sproat 9cb71f0ea3 fix(docker compose): increase healthcheck start period (#1721)
- the healthcheck was commencing before the server had started
- this resulted in the server being incorrectly labelled unhealthy prior to it having had sufficient time to start
- the server was being restarted as a result of this incorrect diagnosis by the healthcheck, resulting in an infinite start->unhealthy->restart cycle
2023-07-24 11:17:53 +01:00
Iain Sproat 2626d9095b fix(docker compose): must use 2.3 as we have features removed in 3 (#1679) 2023-07-10 12:23:27 +01:00
Iain Sproat fad395a292 fix(docker compose): set minimum compose version as '3' (#1677)
- matches the minimum version for our dependencies file ('3')
- healthcheck was introduced in 2.1, and healthcheck.start_period in 2.3, so >=2.3 was minimum
2023-07-10 10:29:10 +01:00
Iain Sproat a0a39bd711 fix(healthcheck): Add a 2 second timeout to the healthchecks (#1674)
* fix(healthcheck): Add a 2 second timeout to the healthcheck http request
* Ensure all error types are caught and the non-zero failure exit code is always 1
2023-07-07 16:22:15 +01:00
Iain Sproat fa36e9e40c feat(docker compose): healthcheck for speckle-server (#1651)
* feat(docker compose): healthcheck for speckle-server
- if speckle server pod becomes unresponsive (but has not yet exited with a non-zero exit code), it will be automatically restarted after 30s.

* feat(1click): add healthcheck to speckle-server container running in DigitalOcean 1click

* fix(1click): remove command statements
- the docker image is responsible for providing these
2023-06-29 15:55:40 +02:00
Iain Sproat 95ef34b67f chore(docker compose): explicitly define FILE_IMPORT_TIME_LIMIT_MIN env var (#1650)
- provides better guidance to other operators as to where this value can be configured
- addresses https://github.com/specklesystems/speckle-server/issues/1207
2023-06-23 16:21:09 +01:00
Iain Sproat 68fd86b754 chore(frontend): use bitnami/openresty as base image for frontend Dockerfile (#1335)
* chore(frontend): use bitnami/openresty as base image for frontend Dockerfile

openresty/openresty was not being patched as frequently as we would like, resulting in numerous
vulnerabilities without resolution. bitnami/openresty is being patched more frequently.

Some additional changes were necessary when porting our frontend between these distributions:
- html files are in /app
- nginx.conf is in /opt/bitnami/openresty/nginx/conf/nginx.conf
- envsubst is not available by default in bitnami/openresty and needs to be copied in
- Nginx.conf - we wrap the server block in http block and overwrite root nginx.conf
    - using the existing bitnami/openresty nginx.conf as a server block alone causes issues with bitnami/openresty, as bitnami/openresty provides a root nginx.conf which conflicts with directives in Speckle's server block
- we copy the directives from openresty/openresty (which are known to work with Speckle's server block), and apply them alongside Speckle's server block. This creates a new root nginx.conf which we can overwrite the default on the image.
- nginx should use a port available to non sudo/root user, we have selected 8080 instead of previous 80
- need to explicitly output nginx logs to stderr / stdout

Created a readonly root file system on Kubernetes. This requires the following changes:
- emptyDir volumes are mounted in kubernetes to allow bitnami/openresty to write to specific locations
- explicitly include and copy mime.types file to nginx configuration directory

Due to the change to non-privileged port number (8080), the following subsequent changes were required:
- Update 1-click deployment script to match frontend at port 8080
- Updates docker-compose-speckle.yaml file

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2023-01-25 19:06:48 +00:00
Iain Sproat 4d01e13a84 feat(structured logging) (#1242)
* Revert "Revert structured logging 2 (#1240)"
This reverts commit 78ecaeffcb.
* Logging should not be bundled into core shared directory
* making sure observability stuff isnt bundled into frontend


Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
2022-12-06 11:51:18 +00:00
Iain Sproat 78ecaeffcb Revert structured logging 2 (#1240)
* Revert "'@' shortcut must come after it is configured in bootstrap (#1239)"

This reverts commit 967329473f.

* Revert "Structured logging (attempt 2) (#1234)"

This reverts commit 444d2ca7dd.
2022-12-05 15:46:09 +00:00
Iain Sproat 444d2ca7dd Structured logging (attempt 2) (#1234)
* Revert "Revert "feat(structured logging): implements structured logging for backend (#1217)" (#1227)"

This reverts commit 63e6581162.

* Use pino-http instead of express pino logger
* Use correct reference to knex and do not instantiate HttpLogger prematurely
* Adds missing dependency for pino to webhook-service
* Do not instantiate middleware when passed to express
* Refactor to move logging into shared
* Copy shared packages into dockerfiles
* Build shared workspace in docker build-stage for fileimport & webhook
2022-12-05 14:49:52 +00:00
Iain Sproat 63e6581162 Revert "feat(structured logging): implements structured logging for backend (#1217)" (#1227)
This reverts commit 84cb74e8b3.
2022-11-25 16:57:28 +00:00
Iain Sproat 84cb74e8b3 feat(structured logging): implements structured logging for backend (#1217)
* each log line is a json object
* structured logging allows logs to be ingested by machines and the logs to be indexed and queried addresses #1105
* structured logging allows arbitrary properties to be appended to each log line, and ingestion of logs to remain robust
* Structured logging provided by `pino` library
* Add `express-pino-logger` dependency
* Remove `debug`, `morgan`, and `morgan-debug` and replace with structured logging
* `console.log` & `console.error` replaced with structured logging in backend
* Remove `DEBUG` environment variable and replace with `LOG_LEVEL`
- Note that there is a test which reads from a logged line on `stdout`. This is not robust, it would be better to use the childProcess.pid to look up the port number.
* Log errors at points we explicitly send error to Sentry
* Amend indentation of a couple of log messages to align indentation with others
2022-11-25 16:05:05 +00:00
Iain Sproat da7dafe819 fix(fileimport service): s3 is not required by fileimport service (#924)
Fileimport service retreives blobs via the server storage API, and not directly from s3.  Fileimport
service no longer requires information or credentials about s3.
2022-08-15 15:49:10 +01:00
Peter Grainger 72d27b9a7c Allow save object to S3 in different region (#910)
* Allow save object to S3 in different region

* feat(helm & docker-compose): adds S3_REGION to helm chart & docker-compose

Explicitly adding the environment variable to deployment configuration files provides system operators with documentation of its existence.

Set to empty by default, which will result in the default value being used.

Co-authored-by: Iain Sproat <68657+iainsproat@users.noreply.github.com>
2022-08-15 14:24:30 +02:00
Iain Sproat 90847e422d Feat: configurable file limits (#835)
* Feat: configurable file limits

* ci(circleci): container build speed imporvements

* feat(frontend nginx): add file size limit configurability to frontend nginx

* feat(server blobstorage): use the new file size limit customization value

* feat(helm chart): implement the file size configuration in the helm chart

* fix(frontend docker): fix entrypoint script

* fix(server blobstorage): fix env var parsing NaN

* feat(fileimport-service): add customizable import timeout

* feat(helm chart): add fileimport service timeout value to helm chart

* feat(blobstorage): add server side blob storage size limits

* feat(docker-compose): add blob size limit env var to  docker-compose files

* refactor(frontend file uploads): refactor file uploads to use `useQuery`

* refactor(server env helper): move env helper to shared module

* refactor(blobstorage): use env helper for file size limit

* refactor(frontend file uploads): use generated query document

* fix(server blob sotrage): fix file size limit function call

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2022-07-29 12:00:29 +02:00
Fabians abe6d5e086 chore: re-formatted everything with prettier 2022-03-30 12:54:24 +03:00
Cristian Balas f3e74e0e64 Preview service fixes (#530) 2022-01-19 21:03:39 +02:00
Cristian Balas 019b7ac495 Service health (#516)
* health checks, sigterm handling for all services
2022-01-12 15:18:32 +02:00
cristi8 24f8239ad8 docker-compose for speckle now includes FileImport service 2021-11-03 14:30:48 +02:00
Cristian Balas f17b4a4dbd Merge pull request #343 from specklesystems/webhooks
Webhooks
2021-07-23 12:57:30 +03:00
Cristian Balas 37f18be68d Added memory limits to previewservice (#349) 2021-07-21 10:39:16 +03:00