Instance
Overview
Eclipse AutoWRX consists of three main components that work together:
- Frontend (autowrx): React-based web interface for the digital.auto playground
- Backend (backend-core): RESTful API server handling business logic
- SDV Runtime: Containerized runtime environment for vehicle applications
This guide covers the setup and configuration of all components using Docker only.
Prerequisites
- Docker & Docker Compose
- Git
- Linux/macOS recommended
- GitHub Personal Access Token (PAT) for pulling GHCR images
Environment Configuration
Create a .env
file:
NODE_ENV=development
ENV=dev
# MongoDB
MONGODB_URL=mongodb://mongodb:27017/playground
MONGO_USER=
MONGO_PASSWORD=
MONGO_DB=playground
MONGODB_PORT=27017
MONGOOSE_STRICT_QUERY=true
# Upload Service
UPLOAD_PORT=3000
UPLOAD_DOMAIN=upload
UPLOAD_PROTOCOL=http
UPLOAD_PATH=/usr/src/upload/data
BACKEND_PORT=3000
# JWT
JWT_SECRET=thisisasamplesecret
JWT_ACCESS_EXPIRATION_MINUTES=30
JWT_REFRESH_EXPIRATION_DAYS=30
JWT_COOKIE_NAME=token
# Kong
KONG_PROXY_PORT=8000
KONG_NGINX_WORKER_PROCESSES=auto
# Homologation
HOMOLOGATION_AUTH_CLIENT_ID=your_client_id
HOMOLOGATION_AUTH_CLIENT_SECRET=your_client_secret
# CORS
CORS_ORIGIN=localhost:\d+,127\.0\.0\.1:\d+
# Admin Configuration
ADMIN_EMAILS=admin@example.com
ADMIN_PASSWORD=admin_secure_password
# Logging
LOG_LEVEL=debug
Docker Compose Setup
Create a docker-compose.yml
file:
version: '3.8'
services:
frontend:
image: ghcr.io/eclipse-autowrx/autowrx-app:latest
ports:
- "${FRONTEND_PORT:-3000}:4173"
environment:
- VITE_API_URL=${API_URL}
- VITE_WS_URL=${WS_URL}
depends_on:
- backend
restart: unless-stopped
backend:
image: ghcr.io/eclipse-autowrx/playground-be:latest
ports:
- "${BACKEND_PORT}:3000"
environment:
- NODE_ENV=${NODE_ENV}
- MONGODB_URL=${MONGODB_URL}
- JWT_SECRET=${JWT_SECRET}
- JWT_ACCESS_EXPIRATION_MINUTES=${JWT_ACCESS_EXPIRATION_MINUTES}
- JWT_REFRESH_EXPIRATION_DAYS=${JWT_REFRESH_EXPIRATION_DAYS}
- UPLOAD_PORT=${UPLOAD_PORT}
- UPLOAD_DOMAIN=${UPLOAD_DOMAIN}
depends_on:
- mongodb
restart: unless-stopped
entrypoint: []
command: ["yarn", "dev"]
sdv-runtime:
image: ghcr.io/eclipse-autowrx/sdv-runtime:latest
environment:
- RUNTIME_NAME=ProductionRuntime
- SYNCER_SERVER_URL=http://localhost:3090
ports:
- "55555:55555"
depends_on:
- backend
volumes:
- ./data/runtime:/data
restart: unless-stopped
mongodb:
image: mongo:4.4.6-bionic
ports:
- "${MONGODB_PORT}:27017"
volumes:
- dbdata:/data/db
restart: unless-stopped
volumes:
dbdata:
Start the Stack
- Authenticate to GitHub Container Registry:
echo $GITHUB_PAT | docker login ghcr.io -u USERNAME --password-stdin
- Pull and start all services:
docker compose pull
docker compose up -d
Access the Services
- Frontend: http://localhost:4173
- Backend API: http://localhost:3000/api
- SDV Runtime Databroker: localhost:55555
Logs and Status
docker compose ps
docker compose logs -f