From 9dc3ab6c8ff6a7e1d241c1039e7e07301b02fd53 Mon Sep 17 00:00:00 2001 From: cfngc4594 Date: Tue, 8 Apr 2025 14:11:09 +0800 Subject: [PATCH] feat(docker): update docker-compose.yml with environment variables and remote Docker configuration --- compose.cn.yml | 28 ++++++++++++++++++++++++++++ compose.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/compose.cn.yml b/compose.cn.yml index 299108e..5b6ccda 100644 --- a/compose.cn.yml +++ b/compose.cn.yml @@ -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: diff --git a/compose.yml b/compose.yml index ad854d9..2c93ba5 100644 --- a/compose.yml +++ b/compose.yml @@ -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: