Add extracted tools: CitrineOS, OpenOCPP, ShapeShifter
- CitrineOS core extracted (CSMS OCPP 2.0.1) - OpenOCPP extracted (firmware OCPP 1.6J/2.0.1) - ShapeShifter library installed (pip install -e) - ShapeShifter specification extracted - EVerest extracted TODO updated with progress
This commit is contained in:
181
tools/citrineos-core-main/apps/Server/docker-compose.yml
Executable file
181
tools/citrineos-core-main/apps/Server/docker-compose.yml
Executable file
@@ -0,0 +1,181 @@
|
||||
# SPDX-FileCopyrightText: 2025 Contributors to the CitrineOS Project
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
services:
|
||||
amqp-broker:
|
||||
image: rabbitmq:3-management
|
||||
ports:
|
||||
- 15672:15672
|
||||
- 5672:5672
|
||||
environment:
|
||||
RABBITMQ_DEFAULT_USER: "guest"
|
||||
RABBITMQ_DEFAULT_PASS: "guest"
|
||||
volumes:
|
||||
- ./data/rabbitmq:/var/lib/rabbitmq
|
||||
healthcheck:
|
||||
test: rabbitmq-diagnostics -q check_port_connectivity
|
||||
interval: 10s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
ocpp-db:
|
||||
image: postgis/postgis:16-3.5
|
||||
platform: linux/amd64
|
||||
ports:
|
||||
- 5432:5432
|
||||
volumes:
|
||||
- ./data/postgresql/pgdata:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_DB: citrine
|
||||
POSTGRES_USER: citrine
|
||||
POSTGRES_PASSWORD: "citrine"
|
||||
healthcheck:
|
||||
test: "pg_isready --username=citrine"
|
||||
interval: 5s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
citrine:
|
||||
image: citrineos-core-citrine:latest
|
||||
build:
|
||||
context: ../../
|
||||
dockerfile: ./apps/Server/deploy.Dockerfile
|
||||
volumes:
|
||||
- ../../pnpm-lock.yaml:/usr/local/apps/citrineos/pnpm-lock.yaml
|
||||
- ../../package.json:/usr/local/apps/citrineos/package.json
|
||||
- ../../tsconfig.json:/usr/local/apps/citrineos/tsconfig.json
|
||||
- ../../tsconfig.build.json:/usr/local/apps/citrineos/tsconfig.build.json
|
||||
- ./:/usr/local/apps/citrineos/apps/Server
|
||||
- ../../packages/base:/usr/local/apps/citrineos/packages/base
|
||||
- ../../packages/core:/usr/local/apps/citrineos/packages/core
|
||||
- /usr/local/apps/citrineos/node_modules
|
||||
- /usr/local/apps/citrineos/apps/Server/node_modules
|
||||
- /usr/local/apps/citrineos/packages/base/node_modules
|
||||
- /usr/local/apps/citrineos/packages/core/node_modules
|
||||
- /usr/local/apps/citrineos/dist/
|
||||
- /usr/local/apps/citrineos/apps/Server/dist/
|
||||
- /usr/local/apps/citrineos/packages/base/dist/
|
||||
- /usr/local/apps/citrineos/packages/core/dist/
|
||||
environment:
|
||||
APP_NAME: "all"
|
||||
APP_ENV: "docker"
|
||||
# Add AWS region (required by the SDK)
|
||||
AWS_REGION: us-east-1
|
||||
# Skip authentication completely - use public access
|
||||
AWS_ACCESS_KEY_ID: minioadmin
|
||||
AWS_SECRET_ACCESS_KEY: minioadmin
|
||||
# Database Strategy
|
||||
DB_STRATEGY: "migrate"
|
||||
# Bootstrap Configuration Environment Variables
|
||||
BOOTSTRAP_CITRINEOS_DATABASE_HOST: "ocpp-db"
|
||||
BOOTSTRAP_CITRINEOS_CONFIG_FILENAME: "config.json"
|
||||
# CITRINEOS_CONFIG_DIR: '/custom/config/path' # Optional - uncomment if needed
|
||||
BOOTSTRAP_CITRINEOS_FILE_ACCESS_TYPE: "local"
|
||||
BOOTSTRAP_CITRINEOS_FILE_ACCESS_LOCAL_DEFAULT_FILE_PATH: "/data"
|
||||
# No System Config file persistence respected, to avoid local conflicts across version updates - recommended to remove for production
|
||||
CONFIG_CITRINEOS_WIPE_FILE_ON_START: "true"
|
||||
depends_on:
|
||||
ocpp-db:
|
||||
condition: service_healthy
|
||||
amqp-broker:
|
||||
condition: service_healthy
|
||||
minio-init:
|
||||
condition: service_completed_successfully
|
||||
ports:
|
||||
- 8080:8080
|
||||
- 8081:8081
|
||||
- 8082:8082
|
||||
- 8083:8083
|
||||
- 8443:8443
|
||||
- 8444:8444
|
||||
- 9229:9229
|
||||
healthcheck:
|
||||
test: [
|
||||
"CMD-SHELL",
|
||||
"node -e \"const net = require(\\\"net\\\"); const client =
|
||||
net.createConnection(8080, \\\"127.0.0.1\\\", () => { client.end();
|
||||
process.exit(0); }); client.on(\\\"error\\\", () =>
|
||||
process.exit(1)); client.setTimeout(5000, () => { client.destroy();
|
||||
process.exit(1); });\"",
|
||||
]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 60s
|
||||
|
||||
minio:
|
||||
image: minio/minio
|
||||
container_name: minio
|
||||
ports:
|
||||
- "9000:9000"
|
||||
- "9001:9001"
|
||||
environment:
|
||||
# Use default credentials for simplicity
|
||||
MINIO_ROOT_USER: minioadmin
|
||||
MINIO_ROOT_PASSWORD: minioadmin
|
||||
# Enable public buckets
|
||||
MINIO_BROWSER_REDIRECT_URL: http://localhost:9001
|
||||
MINIO_SERVER_URL: http://localhost:9000
|
||||
volumes:
|
||||
- ./data/minio:/data
|
||||
command: server /data --console-address ":9001"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 20s
|
||||
|
||||
# Initialize MinIO
|
||||
minio-init:
|
||||
image: minio/mc
|
||||
depends_on:
|
||||
minio:
|
||||
condition: service_healthy
|
||||
entrypoint: >
|
||||
/bin/sh -c " # Enable command echoing and error reporting set -x
|
||||
|
||||
echo 'Setting up MinIO alias' mc alias set myminio http://minio:9000
|
||||
minioadmin minioadmin || echo 'FAILED: alias setup' "
|
||||
|
||||
graphql-engine:
|
||||
image: hasura/graphql-engine:v2.40.3.cli-migrations-v3
|
||||
volumes:
|
||||
- ./hasura-metadata:/hasura-metadata
|
||||
ports:
|
||||
- 8090:8080
|
||||
restart: always
|
||||
depends_on:
|
||||
citrine:
|
||||
# ensures hasura migrations will run only after citrine is healthy,
|
||||
# meaning 01_Data/dist/layers/sequelize/util.js was executed and logged
|
||||
# CitrineOS Logger:DefaultSequelizeInstance Database altered,
|
||||
# which means the database is ready to be used by hasura
|
||||
condition: service_healthy
|
||||
environment:
|
||||
## postgres database to store Hasura metadata
|
||||
HASURA_GRAPHQL_DATABASE_URL: postgres://citrine:citrine@ocpp-db:5432/citrine
|
||||
## enable the console served by server
|
||||
HASURA_GRAPHQL_ENABLE_CONSOLE: "true" # set to "false" to disable console
|
||||
## enable debugging mode. It is recommended to disable this in production
|
||||
HASURA_GRAPHQL_DEV_MODE: "true"
|
||||
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
|
||||
HASURA_GRAPHQL_ENABLE_TELEMETRY: "false"
|
||||
## uncomment next line to run console offline (i.e load console assets from server instead of CDN)
|
||||
# HASURA_GRAPHQL_CONSOLE_ASSETS_DIR: /srv/console-assets
|
||||
## uncomment next line to set an admin secret - warning, without configuration this will cause upstream services to fail
|
||||
# HASURA_GRAPHQL_ADMIN_SECRET: CitrineOS!
|
||||
HASURA_GRAPHQL_METADATA_DEFAULTS:
|
||||
"{\"backend_configs\":{\"dataconnector\":{\"a\
|
||||
thena\":{\"uri\":\"http://data-connector-agent:8081/api/v1/athena\"},\"\
|
||||
mariadb\":{\"uri\":\"http://data-connector-agent:8081/api/v1/mariadb\"},\
|
||||
\"mysql8\":{\"uri\":\"http://data-connector-agent:8081/api/v1/mysql\"},\
|
||||
\"oracle\":{\"uri\":\"http://data-connector-agent:8081/api/v1/oracle\"},\
|
||||
\"snowflake\":{\"uri\":\"http://data-connector-agent:8081/api/v1/snowfl\
|
||||
ake\"}}}}"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://graphql-engine:8080/healthz"]
|
||||
interval: 5s
|
||||
timeout: 10s
|
||||
retries: 20
|
||||
start_period: 5s
|
||||
Reference in New Issue
Block a user