Граф коммитов

32 Коммитов

Автор SHA1 Сообщение Дата
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
cristi8 e7554b0c29 docker-compose update to include webhook-service 2021-07-12 11:46:18 +03:00
cristi8 45bd878889 Added preview-service to docker-compose-speckle 2021-05-14 14:15:07 +03:00
Cristian Balas 4f5a8dd10e
Simplified deployments and documentation (#168)
* added "wait" command to server docker container

* readme.md updates, development mode now listen only on localhost by default, added BIND_ADDRESS environment variable for server
2021-04-07 23:32:25 +03:00
Cristian Balas 02992c9ca0
Simplified setting up a local dev setup (#159)
* Simplified the local dev setup
2021-03-31 13:43:22 +03:00