163 строки
4.1 KiB
YAML
163 строки
4.1 KiB
YAML
version: "3.9"
|
|
name: "speckle-server"
|
|
|
|
services:
|
|
####
|
|
# Speckle Server dependencies
|
|
#######
|
|
postgres:
|
|
image: "postgres:14.5-alpine"
|
|
restart: always
|
|
environment:
|
|
POSTGRES_DB: speckle
|
|
POSTGRES_USER: speckle
|
|
POSTGRES_PASSWORD: speckle
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data/
|
|
healthcheck:
|
|
# the -U user has to match the POSTGRES_USER value
|
|
test: ["CMD-SHELL", "pg_isready -U speckle"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 30
|
|
|
|
redis:
|
|
image: "redis:6.0-alpine"
|
|
restart: always
|
|
volumes:
|
|
- redis-data:/data
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 30
|
|
|
|
minio:
|
|
image: "minio/minio:RELEASE.2023-10-25T06-33-25Z"
|
|
command: server /data --console-address ":9001"
|
|
restart: always
|
|
volumes:
|
|
- minio-data:/data
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD-SHELL",
|
|
"curl -s -o /dev/null http://127.0.0.1:9000/minio/index.html",
|
|
]
|
|
interval: 5s
|
|
timeout: 30s
|
|
retries: 30
|
|
start_period: 10s
|
|
|
|
####
|
|
# Speckle Server
|
|
#######
|
|
speckle-frontend:
|
|
image: speckle/speckle-frontend:latest
|
|
restart: always
|
|
ports:
|
|
- "0.0.0.0:8080:8080"
|
|
environment:
|
|
FILE_SIZE_LIMIT_MB: 100
|
|
|
|
speckle-server:
|
|
image: speckle/speckle-server:latest
|
|
restart: always
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD",
|
|
"node",
|
|
"-e",
|
|
"require('node:http').request({headers: {'Content-Type': 'application/json'}, port:3000, hostname:'127.0.0.1', path:'/graphql?query={serverInfo{version}}', method: 'GET' }, (res) => { body = ''; res.on('data', (chunk) => {body += chunk;}); res.on('end', () => {process.exit(res.statusCode != 200 || body.toLowerCase().includes('error'));}); }).end();",
|
|
]
|
|
interval: 10s
|
|
timeout: 3s
|
|
retries: 30
|
|
ports:
|
|
- "0.0.0.0:3000:3000"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
minio:
|
|
condition: service_healthy
|
|
environment:
|
|
# TODO: Change this to the URL of the speckle server, as accessed from the network
|
|
CANONICAL_URL: "http://127.0.0.1:8080"
|
|
SPECKLE_AUTOMATE_URL: "http://127.0.0.1:3030"
|
|
|
|
# TODO: Change thvolumes:
|
|
REDIS_URL: "redis://redis"
|
|
|
|
S3_ENDPOINT: "http://minio:9000"
|
|
S3_ACCESS_KEY: "minioadmin"
|
|
S3_SECRET_KEY: "minioadmin"
|
|
S3_BUCKET: "speckle-server"
|
|
S3_CREATE_BUCKET: "true"
|
|
|
|
FILE_SIZE_LIMIT_MB: 100
|
|
|
|
# TODO: Change this to a unique secret for this server
|
|
SESSION_SECRET: "TODO:ReplaceWithLongString"
|
|
|
|
STRATEGY_LOCAL: "true"
|
|
DEBUG: "speckle:*"
|
|
|
|
POSTGRES_URL: "postgres"
|
|
POSTGRES_USER: "speckle"
|
|
POSTGRES_PASSWORD: "speckle"
|
|
POSTGRES_DB: "speckle"
|
|
ENABLE_MP: "false"
|
|
|
|
preview-service:
|
|
image: speckle/speckle-preview-service:latest
|
|
restart: always
|
|
depends_on:
|
|
speckle-server:
|
|
condition: service_healthy
|
|
mem_limit: "1000m"
|
|
memswap_limit: "1000m"
|
|
environment:
|
|
DEBUG: "preview-service:*"
|
|
PG_CONNECTION_STRING: "postgres://speckle:speckle@postgres/speckle"
|
|
|
|
webhook-service:
|
|
image: speckle/speckle-webhook-service:latest
|
|
restart: always
|
|
depends_on:
|
|
speckle-server:
|
|
condition: service_healthy
|
|
environment:
|
|
DEBUG: "webhook-service:*"
|
|
PG_CONNECTION_STRING: "postgres://speckle:speckle@postgres/speckle"
|
|
WAIT_HOSTS: postgres:5432
|
|
|
|
fileimport-service:
|
|
image: speckle/speckle-fileimport-service:latest
|
|
restart: always
|
|
depends_on:
|
|
speckle-server:
|
|
condition: service_healthy
|
|
environment:
|
|
DEBUG: "fileimport-service:*"
|
|
PG_CONNECTION_STRING: "postgres://speckle:speckle@postgres/speckle"
|
|
WAIT_HOSTS: postgres:5432
|
|
|
|
S3_ENDPOINT: "http://minio:9000"
|
|
S3_ACCESS_KEY: "minioadmin"
|
|
S3_SECRET_KEY: "minioadmin"
|
|
S3_BUCKET: "speckle-server"
|
|
|
|
SPECKLE_SERVER_URL: "http://speckle-server:3000"
|
|
|
|
networks:
|
|
default:
|
|
name: speckle-server
|
|
|
|
volumes:
|
|
postgres-data:
|
|
redis-data:
|
|
minio-data:
|