fix(docker compose): preview service can be used with docker compose

This commit is contained in:
Iain Sproat
2025-03-15 10:43:40 +00:00
parent 5c22e90fb0
commit 6e170d0c4f
3 changed files with 61 additions and 45 deletions
+18 -5
View File
@@ -1,4 +1,3 @@
version: '2.4'
services:
speckle-ingress:
build:
@@ -22,12 +21,16 @@ services:
restart: always
environment:
NUXT_PUBLIC_SERVER_NAME: 'local'
#TODO: Change this to the URL of your server. This is the URL of the server as accessed by users.
NUXT_PUBLIC_API_ORIGIN: 'http://127.0.0.1'
#TODO: Change this to the URL of your server. This is the URL of the server as accessed by users.
NUXT_PUBLIC_BASE_URL: 'http://127.0.0.1'
# This is the URL of the server as accessed via this docker compose network.
NUXT_PUBLIC_BACKEND_API_ORIGIN: 'http://speckle-server:3000'
NUXT_PUBLIC_LOG_LEVEL: 'warn'
NUXT_REDIS_URL: 'redis://redis'
LOG_LEVEL: 'info'
LOG_PRETTY: 'true'
speckle-server:
build:
@@ -47,14 +50,20 @@ services:
retries: 3
start_period: 90s
environment:
# TODO: Change this to the URL of the speckle server, as accessed from the network
# TODO. Change this to the url of your server. This is the URL of the server as accessed by users.
CANONICAL_URL: 'http://127.0.0.1'
# This is the URL of the server as accessed by other Speckle services within this docker compose network, such as preview-service.
# This will be the same value as NUXT_PUBLIC_BACKEND_API_ORIGIN as defined in the frontend-2 service.
PRIVATE_SERVER_URL: 'http://speckle-server:3000'
# TODO: Change this to a unique secret for this server
SESSION_SECRET: 'TODO:Replace'
# This is the authentication strategy to use. Local (i.e. username & password) is the default strategy.
STRATEGY_LOCAL: 'true'
LOG_LEVEL: 'info'
LOG_PRETTY: 'true'
POSTGRES_URL: 'postgres'
POSTGRES_USER: 'speckle'
@@ -62,6 +71,7 @@ services:
POSTGRES_DB: 'speckle'
REDIS_URL: 'redis://redis'
PREVIEW_SERVICE_REDIS_URL: 'redis://redis'
S3_ENDPOINT: 'http://minio:9000'
S3_ACCESS_KEY: 'minioadmin'
@@ -85,10 +95,11 @@ services:
mem_limit: '3000m'
memswap_limit: '3000m'
environment:
HOST: '127.0.0.1' # Only accept connections from localhost, as preview service does not need to be exposed outside the container.
METRICS_HOST: '127.0.0.1' # Amend if you want to expose Prometheus metrics outside of the container
HOST: '127.0.0.1' # The preview service does not need to be exposed outside the container.
PORT: '3001'
LOG_LEVEL: 'info'
PG_CONNECTION_STRING: 'postgres://speckle:speckle@postgres/speckle'
LOG_PRETTY: 'true'
REDIS_URL: 'redis://redis'
webhook-service:
build:
@@ -99,6 +110,7 @@ services:
restart: always
environment:
LOG_LEVEL: 'info'
LOG_PRETTY: 'true'
PG_CONNECTION_STRING: 'postgres://speckle:speckle@postgres/speckle'
fileimport-service:
@@ -110,6 +122,7 @@ services:
restart: always
environment:
LOG_LEVEL: 'info'
LOG_PRETTY: 'true'
PG_CONNECTION_STRING: 'postgres://speckle:speckle@postgres/speckle'
SPECKLE_SERVER_URL: 'http://speckle-server:3000'
FILE_IMPORT_TIME_LIMIT_MIN: 10