feat(docker): update docker-compose.yml with environment variables and remote Docker configuration

This commit is contained in:
cfngc4594 2025-04-08 14:11:09 +08:00
parent ca815d5b80
commit 9dc3ab6c8f
2 changed files with 56 additions and 0 deletions

View File

@ -24,7 +24,35 @@ services:
retries: 5
start_period: 10s
volumes:
# Local Docker daemon (default).
# Use remote Docker daemon by commenting out this line.
- /var/run/docker.sock:/var/run/docker.sock
# Mount TLS certificates when using a remote Docker daemon with TLS.
# Uncomment the following line if you're connecting to a remote Docker host over TLS.
# You can customize the path where the certificates are stored.
# DOCKER_REMOTE_CERTS_PATH should contain ca.pem, cert.pem, and key.pem files.
# Example: /path/to/certs:/certs
# - ${DOCKER_REMOTE_CERTS_PATH}:/certs
environment:
# Mandatory configurations:
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}?schema=public
- AUTH_SECRET=${AUTH_SECRET}
- AUTH_GITHUB_ID=${AUTH_GITHUB_ID}
- AUTH_GITHUB_SECRET=${AUTH_GITHUB_SECRET}
- AUTH_URL=${AUTH_URL}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- OPENAI_BASE_URL=${OPENAI_BASE_URL} # Optional
# Remote Docker configuration (activate only for remote Docker):
# - DOCKER_HOST_MODE=${DOCKER_HOST_MODE} # Options: "remote" or leave empty for local
# - DOCKER_REMOTE_PROTOCOL=${DOCKER_REMOTE_PROTOCOL} # Example: "https" or "http" or "ssh"
# - DOCKER_REMOTE_HOST=${DOCKER_REMOTE_HOST} # Remote Docker host address
# - DOCKER_REMOTE_PORT=${DOCKER_REMOTE_PORT} # Remote Docker port number
# TLS certificate paths for secure communication with the remote Docker daemon.
# You can customize these paths to where your certificates are located on your system.
# By default, they are mounted under /certs, but you can specify a custom path here.
# - DOCKER_REMOTE_CA_PATH=${DOCKER_REMOTE_CA_PATH} # Custom path for CA certificate (default: /certs/ca.pem)
# - DOCKER_REMOTE_CERT_PATH=${DOCKER_REMOTE_CERT_PATH} # Custom path for certificate (default: /certs/cert.pem)
# - DOCKER_REMOTE_KEY_PATH=${DOCKER_REMOTE_KEY_PATH} # Custom path for key (default: /certs/key.pem)
lsp-c:
build:

View File

@ -24,7 +24,35 @@ services:
retries: 5
start_period: 10s
volumes:
# Local Docker daemon (default).
# Use remote Docker daemon by commenting out this line.
- /var/run/docker.sock:/var/run/docker.sock
# Mount TLS certificates when using a remote Docker daemon with TLS.
# Uncomment the following line if you're connecting to a remote Docker host over TLS.
# You can customize the path where the certificates are stored.
# DOCKER_REMOTE_CERTS_PATH should contain ca.pem, cert.pem, and key.pem files.
# Example: /path/to/certs:/certs
# - ${DOCKER_REMOTE_CERTS_PATH}:/certs
environment:
# Mandatory configurations:
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}?schema=public
- AUTH_SECRET=${AUTH_SECRET}
- AUTH_GITHUB_ID=${AUTH_GITHUB_ID}
- AUTH_GITHUB_SECRET=${AUTH_GITHUB_SECRET}
- AUTH_URL=${AUTH_URL}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- OPENAI_BASE_URL=${OPENAI_BASE_URL} # Optional
# Remote Docker configuration (activate only for remote Docker):
# - DOCKER_HOST_MODE=${DOCKER_HOST_MODE} # Options: "remote" or leave empty for local
# - DOCKER_REMOTE_PROTOCOL=${DOCKER_REMOTE_PROTOCOL} # Example: "https" or "http" or "ssh"
# - DOCKER_REMOTE_HOST=${DOCKER_REMOTE_HOST} # Remote Docker host address
# - DOCKER_REMOTE_PORT=${DOCKER_REMOTE_PORT} # Remote Docker port number
# TLS certificate paths for secure communication with the remote Docker daemon.
# You can customize these paths to where your certificates are located on your system.
# By default, they are mounted under /certs, but you can specify a custom path here.
# - DOCKER_REMOTE_CA_PATH=${DOCKER_REMOTE_CA_PATH} # Custom path for CA certificate (default: /certs/ca.pem)
# - DOCKER_REMOTE_CERT_PATH=${DOCKER_REMOTE_CERT_PATH} # Custom path for certificate (default: /certs/cert.pem)
# - DOCKER_REMOTE_KEY_PATH=${DOCKER_REMOTE_KEY_PATH} # Custom path for key (default: /certs/key.pem)
lsp-c:
build: