Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
services:
exosphere-state-manager:
build:
context: ./state-manager
dockerfile: Dockerfile
image: exosphere-state-manager:local
container_name: exosphere-state-manager
restart: unless-stopped
environment:
- MONGO_URI=${MONGO_URI}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
- STATE_MANAGER_SECRET=${STATE_MANAGER_SECRET:-exosphere@123}
- MONGO_DATABASE_NAME=${MONGO_DATABASE_NAME:-exosphere}
- SECRETS_ENCRYPTION_KEY=${SECRETS_ENCRYPTION_KEY:-YTzpUlBGLSwm-3yKJRJTZnb0_aQuQQHyz64s8qAERVU=}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Committing default secrets, even for local development, is a security risk. These secrets could be inadvertently used in other environments. It's recommended to remove the default values. For local development, you can use a .env file (which should be in .gitignore) and provide a .env.example file with placeholder values to guide users.

      - STATE_MANAGER_SECRET=${STATE_MANAGER_SECRET}
      - MONGO_DATABASE_NAME=${MONGO_DATABASE_NAME:-exosphere}
      - SECRETS_ENCRYPTION_KEY=${SECRETS_ENCRYPTION_KEY}

Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
ports:
Comment thread
coderabbitai[bot] marked this conversation as resolved.
- "8000:8000"
networks:
- exosphere-network
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s

exosphere-dashboard:
image: ghcr.io/exospherehost/exosphere-dashboard:${EXOSPHERE_TAG:-latest}
pull_policy: always
container_name: exosphere-dashboard
restart: unless-stopped
environment:
# Server-side secure configuration (NOT exposed to browser)
- EXOSPHERE_STATE_MANAGER_URI=${EXOSPHERE_STATE_MANAGER_URI:-http://exosphere-state-manager:8000}
- EXOSPHERE_API_KEY=${EXOSPHERE_API_KEY:-exosphere@123}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Similar to the other secrets, this default API key should be removed to avoid security risks. It's better to rely on environment variables provided via a .env file for local setup.

      - EXOSPHERE_API_KEY=${EXOSPHERE_API_KEY}

Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
# Client-side configuration (exposed to browser)
- NEXT_PUBLIC_DEFAULT_NAMESPACE=${NEXT_PUBLIC_DEFAULT_NAMESPACE:-default}
depends_on:
exosphere-state-manager:
condition: service_healthy
ports:
- "3000:3000"
networks:
- exosphere-network
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000', (res) => process.exit(res.statusCode === 200 ? 0 : 1)).on('error', () => process.exit(1))"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s

Comment thread
coderabbitai[bot] marked this conversation as resolved.
networks:
exosphere-network:
driver: bridge
attachable: true
162 changes: 162 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"dependencies": {
"mongodb": "^7.0.0"
}
}
Loading