2019-07-30 09:59:30 +00:00
|
|
|
version: "2.0"
|
2018-02-20 09:20:12 +00:00
|
|
|
|
|
|
|
volumes:
|
2019-03-05 11:36:27 +00:00
|
|
|
certs: {}
|
|
|
|
cert-provider: {}
|
|
|
|
db: {}
|
|
|
|
redis: {}
|
|
|
|
s3: {}
|
2018-02-20 09:20:12 +00:00
|
|
|
|
|
|
|
services:
|
|
|
|
api:
|
|
|
|
extends:
|
|
|
|
file: ./common.yml
|
|
|
|
service: component
|
2019-07-30 09:59:30 +00:00
|
|
|
image: balena/open-balena-api:${OPENBALENA_API_VERSION_TAG}
|
2018-02-20 09:20:12 +00:00
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
- s3
|
|
|
|
- redis
|
|
|
|
environment:
|
|
|
|
API_VPN_SERVICE_API_KEY: ${OPENBALENA_API_VPN_SERVICE_API_KEY}
|
2022-02-10 15:02:49 +00:00
|
|
|
ROOT_CA: ${OPENBALENA_ROOT_CA}
|
2018-02-20 09:20:12 +00:00
|
|
|
COOKIE_SESSION_SECRET: ${OPENBALENA_COOKIE_SESSION_SECRET}
|
2019-03-05 11:36:27 +00:00
|
|
|
DB_HOST: db
|
2018-02-20 09:20:12 +00:00
|
|
|
DB_PASSWORD: docker
|
|
|
|
DB_PORT: 5432
|
|
|
|
DB_USER: docker
|
|
|
|
DELTA_HOST: delta.${OPENBALENA_HOST_NAME}
|
2018-11-05 23:38:14 +00:00
|
|
|
DEVICE_CONFIG_OPENVPN_CA: ${OPENBALENA_VPN_CA_CHAIN}
|
2018-11-01 16:16:55 +00:00
|
|
|
DEVICE_CONFIG_SSH_AUTHORIZED_KEYS: ${OPENBALENA_SSH_AUTHORIZED_KEYS}
|
2018-02-20 09:20:12 +00:00
|
|
|
HOST: api.${OPENBALENA_HOST_NAME}
|
|
|
|
IMAGE_MAKER_URL: img.${OPENBALENA_HOST_NAME}
|
|
|
|
IMAGE_STORAGE_BUCKET: resin-production-img-cloudformation
|
2020-11-03 16:15:14 +00:00
|
|
|
IMAGE_STORAGE_PREFIX: images
|
2018-02-20 09:20:12 +00:00
|
|
|
IMAGE_STORAGE_ENDPOINT: s3.amazonaws.com
|
|
|
|
JSON_WEB_TOKEN_EXPIRY_MINUTES: 10080
|
|
|
|
JSON_WEB_TOKEN_SECRET: ${OPENBALENA_JWT_SECRET}
|
|
|
|
MIXPANEL_TOKEN: __unused__
|
2019-03-05 11:36:27 +00:00
|
|
|
PRODUCTION_MODE: "${OPENBALENA_PRODUCTION_MODE}"
|
2018-02-20 09:20:12 +00:00
|
|
|
PUBNUB_PUBLISH_KEY: __unused__
|
|
|
|
PUBNUB_SUBSCRIBE_KEY: __unused__
|
2019-03-05 11:36:27 +00:00
|
|
|
REDIS_HOST: redis
|
2018-02-20 09:20:12 +00:00
|
|
|
REDIS_PORT: 6379
|
|
|
|
REGISTRY2_HOST: registry.${OPENBALENA_HOST_NAME}
|
|
|
|
REGISTRY_HOST: registry.${OPENBALENA_HOST_NAME}
|
2019-07-30 09:59:30 +00:00
|
|
|
SENTRY_DSN: ""
|
2018-02-20 09:20:12 +00:00
|
|
|
TOKEN_AUTH_BUILDER_TOKEN: ${OPENBALENA_TOKEN_AUTH_BUILDER_TOKEN}
|
|
|
|
TOKEN_AUTH_CERT_ISSUER: api.${OPENBALENA_HOST_NAME}
|
|
|
|
TOKEN_AUTH_CERT_KEY: ${OPENBALENA_TOKEN_AUTH_KEY}
|
|
|
|
TOKEN_AUTH_CERT_KID: ${OPENBALENA_TOKEN_AUTH_KID}
|
|
|
|
TOKEN_AUTH_CERT_PUB: ${OPENBALENA_TOKEN_AUTH_PUB}
|
2019-03-05 11:36:27 +00:00
|
|
|
TOKEN_AUTH_JWT_ALGO: "ES256"
|
2018-02-20 09:20:12 +00:00
|
|
|
VPN_HOST: vpn.${OPENBALENA_HOST_NAME}
|
|
|
|
VPN_PORT: 443
|
|
|
|
VPN_SERVICE_API_KEY: ${OPENBALENA_VPN_SERVICE_API_KEY}
|
2018-11-06 16:19:21 +00:00
|
|
|
SUPERUSER_EMAIL: ${OPENBALENA_SUPERUSER_EMAIL}
|
|
|
|
SUPERUSER_PASSWORD: ${OPENBALENA_SUPERUSER_PASSWORD}
|
2018-02-20 09:20:12 +00:00
|
|
|
|
|
|
|
registry:
|
|
|
|
extends:
|
|
|
|
file: ./common.yml
|
|
|
|
service: component
|
2019-07-30 09:59:30 +00:00
|
|
|
image: balena/open-balena-registry:${OPENBALENA_REGISTRY_VERSION_TAG}
|
2018-02-20 09:20:12 +00:00
|
|
|
depends_on:
|
|
|
|
- s3
|
|
|
|
- redis
|
|
|
|
environment:
|
|
|
|
API_TOKENAUTH_CRT: ${OPENBALENA_TOKEN_AUTH_PUB}
|
2022-02-10 15:05:43 +00:00
|
|
|
REGISTRY2_HOST: registry.${OPENBALENA_HOST_NAME}
|
|
|
|
ROOT_CA: ${OPENBALENA_ROOT_CA}
|
|
|
|
REGISTRY2_TOKEN_AUTH_ISSUER: api.${OPENBALENA_HOST_NAME}
|
|
|
|
REGISTRY2_TOKEN_AUTH_REALM: https://api.${OPENBALENA_HOST_NAME}/auth/v1/token
|
2019-07-30 10:09:07 +00:00
|
|
|
COMMON_REGION: ${OPENBALENA_S3_REGION}
|
2019-03-28 12:13:36 +00:00
|
|
|
REGISTRY2_CACHE_ENABLED: "false"
|
|
|
|
REGISTRY2_CACHE_ADDR: 127.0.0.1:6379
|
|
|
|
REGISTRY2_CACHE_DB: 0
|
|
|
|
REGISTRY2_CACHE_MAXMEMORY_MB: 1024 # megabytes
|
|
|
|
REGISTRY2_CACHE_MAXMEMORY_POLICY: allkeys-lru
|
2019-07-30 10:09:07 +00:00
|
|
|
REGISTRY2_S3_REGION_ENDPOINT: ${OPENBALENA_S3_ENDPOINT}
|
|
|
|
REGISTRY2_S3_BUCKET: ${OPENBALENA_REGISTRY2_S3_BUCKET}
|
|
|
|
REGISTRY2_S3_KEY: ${OPENBALENA_S3_ACCESS_KEY}
|
|
|
|
REGISTRY2_S3_SECRET: ${OPENBALENA_S3_SECRET_KEY}
|
2018-02-20 09:20:12 +00:00
|
|
|
REGISTRY2_SECRETKEY: ${OPENBALENA_REGISTRY_SECRET_KEY}
|
|
|
|
REGISTRY2_STORAGEPATH: /data
|
2021-05-05 12:37:41 +00:00
|
|
|
REGISTRY2_DISABLE_REDIRECT: "false"
|
2018-02-20 09:20:12 +00:00
|
|
|
|
|
|
|
vpn:
|
|
|
|
extends:
|
|
|
|
file: ./common.yml
|
|
|
|
service: component
|
2019-07-30 09:59:30 +00:00
|
|
|
image: balena/open-balena-vpn:${OPENBALENA_VPN_VERSION_TAG}
|
2018-02-20 09:20:12 +00:00
|
|
|
depends_on:
|
|
|
|
- api
|
|
|
|
cap_add:
|
|
|
|
- NET_ADMIN
|
|
|
|
environment:
|
|
|
|
API_SERVICE_API_KEY: ${OPENBALENA_API_VPN_SERVICE_API_KEY}
|
2022-02-10 15:04:17 +00:00
|
|
|
API_HOST: api.${OPENBALENA_HOST_NAME}
|
|
|
|
ROOT_CA: ${OPENBALENA_ROOT_CA}
|
|
|
|
VPN_PORT: 443
|
2019-03-05 11:36:27 +00:00
|
|
|
PRODUCTION_MODE: "${OPENBALENA_PRODUCTION_MODE}"
|
2022-02-10 15:04:17 +00:00
|
|
|
VPN_GATEWAY: 10.2.0.1
|
2019-07-30 09:59:30 +00:00
|
|
|
SENTRY_DSN: ""
|
2019-03-05 11:36:27 +00:00
|
|
|
VPN_HAPROXY_USEPROXYPROTOCOL: "true"
|
2018-02-20 09:20:12 +00:00
|
|
|
VPN_OPENVPN_CA_CRT: ${OPENBALENA_VPN_CA}
|
|
|
|
VPN_OPENVPN_SERVER_CRT: ${OPENBALENA_VPN_SERVER_CRT}
|
|
|
|
VPN_OPENVPN_SERVER_DH: ${OPENBALENA_VPN_SERVER_DH}
|
|
|
|
VPN_OPENVPN_SERVER_KEY: ${OPENBALENA_VPN_SERVER_KEY}
|
|
|
|
VPN_SERVICE_API_KEY: ${OPENBALENA_VPN_SERVICE_API_KEY}
|
|
|
|
|
|
|
|
db:
|
|
|
|
extends:
|
|
|
|
file: ./common.yml
|
|
|
|
service: system
|
2019-07-30 09:59:30 +00:00
|
|
|
image: balena/open-balena-db:${OPENBALENA_DB_VERSION_TAG}
|
2018-02-20 09:20:12 +00:00
|
|
|
volumes:
|
|
|
|
- db:/var/lib/postgresql/data
|
|
|
|
|
|
|
|
s3:
|
|
|
|
extends:
|
|
|
|
file: ./common.yml
|
2019-05-07 10:18:48 +00:00
|
|
|
service: component
|
2019-07-30 09:59:30 +00:00
|
|
|
image: balena/open-balena-s3:${OPENBALENA_S3_VERSION_TAG}
|
2018-02-20 09:20:12 +00:00
|
|
|
volumes:
|
|
|
|
- s3:/export
|
2019-05-07 10:18:48 +00:00
|
|
|
environment:
|
2019-07-30 10:09:07 +00:00
|
|
|
S3_MINIO_ACCESS_KEY: ${OPENBALENA_S3_ACCESS_KEY}
|
|
|
|
S3_MINIO_SECRET_KEY: ${OPENBALENA_S3_SECRET_KEY}
|
|
|
|
BUCKETS: ${OPENBALENA_S3_BUCKETS}
|
2018-02-20 09:20:12 +00:00
|
|
|
|
|
|
|
redis:
|
|
|
|
extends:
|
|
|
|
file: ./common.yml
|
|
|
|
service: system
|
|
|
|
image: redis:alpine
|
|
|
|
volumes:
|
|
|
|
- redis:/data
|
|
|
|
|
|
|
|
haproxy:
|
|
|
|
extends:
|
|
|
|
file: ./common.yml
|
|
|
|
service: system
|
2019-07-30 09:59:30 +00:00
|
|
|
build: ../src/haproxy
|
2018-02-20 09:20:12 +00:00
|
|
|
depends_on:
|
|
|
|
- api
|
2019-03-05 11:36:27 +00:00
|
|
|
- cert-provider
|
2018-02-20 09:20:12 +00:00
|
|
|
- db
|
|
|
|
- s3
|
|
|
|
- redis
|
2019-03-05 11:36:27 +00:00
|
|
|
- registry
|
|
|
|
- vpn
|
2018-02-20 09:20:12 +00:00
|
|
|
ports:
|
|
|
|
- "80:80"
|
|
|
|
- "443:443"
|
2019-01-25 13:34:58 +00:00
|
|
|
expose:
|
|
|
|
- "222"
|
2021-01-29 15:02:31 +00:00
|
|
|
- "3128"
|
2019-01-25 13:34:58 +00:00
|
|
|
- "5432"
|
|
|
|
- "6379"
|
2018-02-20 09:20:12 +00:00
|
|
|
networks:
|
|
|
|
default:
|
|
|
|
aliases:
|
|
|
|
- api.${OPENBALENA_HOST_NAME}
|
|
|
|
- registry.${OPENBALENA_HOST_NAME}
|
|
|
|
- vpn.${OPENBALENA_HOST_NAME}
|
|
|
|
- db.${OPENBALENA_HOST_NAME}
|
|
|
|
- s3.${OPENBALENA_HOST_NAME}
|
|
|
|
- redis.${OPENBALENA_HOST_NAME}
|
2021-01-21 11:31:07 +00:00
|
|
|
- tunnel.${OPENBALENA_HOST_NAME}
|
2018-02-20 09:20:12 +00:00
|
|
|
environment:
|
|
|
|
BALENA_HAPROXY_CRT: ${OPENBALENA_ROOT_CRT}
|
|
|
|
BALENA_HAPROXY_KEY: ${OPENBALENA_ROOT_KEY}
|
|
|
|
BALENA_ROOT_CA: ${OPENBALENA_ROOT_CA}
|
|
|
|
HAPROXY_HOSTNAME: ${OPENBALENA_HOST_NAME}
|
2019-03-05 11:36:27 +00:00
|
|
|
volumes:
|
|
|
|
- certs:/certs:ro
|
|
|
|
|
|
|
|
cert-provider:
|
2019-07-30 09:59:30 +00:00
|
|
|
build: ../src/cert-provider
|
2019-03-05 11:36:27 +00:00
|
|
|
volumes:
|
|
|
|
- certs:/certs
|
|
|
|
- cert-provider:/usr/src/app/certs
|
|
|
|
environment:
|
|
|
|
ACTIVE: ${OPENBALENA_ACME_CERT_ENABLED}
|
2021-01-21 11:31:07 +00:00
|
|
|
DOMAINS: "api.${OPENBALENA_HOST_NAME},registry.${OPENBALENA_HOST_NAME},s3.${OPENBALENA_HOST_NAME},vpn.${OPENBALENA_HOST_NAME},tunnel.${OPENBALENA_HOST_NAME}"
|
2019-03-05 11:36:27 +00:00
|
|
|
OUTPUT_PEM: /certs/open-balena.pem
|