-
Notifications
You must be signed in to change notification settings - Fork 3
fix: embed compose files, fix PostgreSQL refs, align Go module path #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| version: '3.8' | ||
|
|
||
| # Development mode - both UI and Core run on host | ||
| # Only MongoDB runs in Docker | ||
|
|
||
| services: | ||
| mongodb: | ||
| image: mongo:8.0 | ||
| container_name: kubeorchestra-mongodb-dev | ||
| restart: unless-stopped | ||
| environment: | ||
| MONGO_INITDB_DATABASE: kubeorchestra | ||
| ports: | ||
| - "27017:27017" | ||
| volumes: | ||
| - mongodb_data:/data/db | ||
| - mongodb_config:/data/configdb | ||
| healthcheck: | ||
| test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"] | ||
| interval: 10s | ||
| timeout: 5s | ||
| retries: 5 | ||
| start_period: 10s | ||
|
|
||
| # UI runs on host: cd ui && npm install && npm run dev (port 3001) | ||
| # Core runs on host: cd core && air (port 3000) | ||
| # Both connect to MongoDB at localhost:27017 | ||
|
|
||
| volumes: | ||
| mongodb_data: | ||
| name: kubeorchestra_mongodb_data_dev | ||
| mongodb_config: | ||
| name: kubeorchestra_mongodb_config_dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| version: '3.8' | ||
|
|
||
| # Hybrid Core mode - Core repo cloned, UI from Docker image | ||
| # All services run in Docker for simplicity | ||
|
|
||
| networks: | ||
| kubeorchestra-net: | ||
| driver: bridge | ||
| name: kubeorchestra-network-hybrid | ||
|
|
||
| services: | ||
| mongodb: | ||
| image: mongo:8.0 | ||
| container_name: kubeorchestra-mongodb-hybrid | ||
| restart: unless-stopped | ||
| networks: | ||
| - kubeorchestra-net | ||
| environment: | ||
| MONGO_INITDB_DATABASE: kubeorchestra | ||
| ports: | ||
| - "27017:27017" | ||
| volumes: | ||
| - mongodb_data:/data/db | ||
| - mongodb_config:/data/configdb | ||
| healthcheck: | ||
| test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"] | ||
| interval: 10s | ||
| timeout: 5s | ||
| retries: 5 | ||
| start_period: 10s | ||
|
|
||
| # Core runs in container with mounted code for hot reload | ||
| # This way backend devs don't need Go installed locally | ||
| core: | ||
| image: cosmtrek/air:latest | ||
| container_name: kubeorchestra-core-hybrid | ||
| restart: unless-stopped | ||
| networks: | ||
| - kubeorchestra-net | ||
| volumes: | ||
| - ../core:/app | ||
| - go-modules:/go/pkg/mod # Cache Go modules | ||
| working_dir: /app | ||
| ports: | ||
| - "3000:3000" | ||
| environment: | ||
| MONGO_URI: mongodb://mongodb:27017/kubeorchestra | ||
| MONGO_DB_NAME: kubeorchestra | ||
| depends_on: | ||
| mongodb: | ||
| condition: service_healthy | ||
| command: air | ||
|
|
||
| ui: | ||
| image: ghcr.io/kubeorch/ui:latest | ||
| container_name: kubeorchestra-ui-hybrid | ||
| restart: unless-stopped | ||
| networks: | ||
| - kubeorchestra-net | ||
| ports: | ||
| - "3001:3001" | ||
| environment: | ||
| # Both use internal Docker network names | ||
| NEXT_PUBLIC_API_URL: http://localhost:3000 | ||
| API_URL_INTERNAL: http://core:3000 | ||
| PORT: 3001 | ||
| depends_on: | ||
| - core | ||
|
|
||
| volumes: | ||
| mongodb_data: | ||
| name: kubeorchestra_mongodb_data_hybrid | ||
| mongodb_config: | ||
| name: kubeorchestra_mongodb_config_hybrid | ||
| go-modules: | ||
| name: kubeorchestra_go_modules |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| version: '3.8' | ||
|
|
||
| # Hybrid UI mode - UI runs on host, Core from Docker image | ||
| # MongoDB and Core run in Docker | ||
|
|
||
| networks: | ||
| kubeorchestra-net: | ||
| driver: bridge | ||
| name: kubeorchestra-network-hybrid | ||
|
|
||
| services: | ||
| mongodb: | ||
| image: mongo:8.0 | ||
| container_name: kubeorchestra-mongodb-hybrid | ||
| restart: unless-stopped | ||
| networks: | ||
| - kubeorchestra-net | ||
| environment: | ||
| MONGO_INITDB_DATABASE: kubeorchestra | ||
| ports: | ||
| - "27017:27017" | ||
| volumes: | ||
| - mongodb_data:/data/db | ||
| - mongodb_config:/data/configdb | ||
| healthcheck: | ||
| test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"] | ||
| interval: 10s | ||
| timeout: 5s | ||
| retries: 5 | ||
| start_period: 10s | ||
|
|
||
| core: | ||
| image: ghcr.io/kubeorch/core:latest | ||
| container_name: kubeorchestra-core-hybrid | ||
| restart: unless-stopped | ||
| networks: | ||
| - kubeorchestra-net | ||
| ports: | ||
| - "3000:3000" | ||
| environment: | ||
| MONGO_URI: mongodb://mongodb:27017/kubeorchestra | ||
| MONGO_DB_NAME: kubeorchestra | ||
| depends_on: | ||
| mongodb: | ||
| condition: service_healthy | ||
|
|
||
| # UI runs on host: cd ui && npm install && npm run dev (port 3001) | ||
| # UI connects to Core at localhost:3000 | ||
|
|
||
| volumes: | ||
| mongodb_data: | ||
| name: kubeorchestra_mongodb_data_hybrid | ||
| mongodb_config: | ||
| name: kubeorchestra_mongodb_config_hybrid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| version: '3.8' | ||
|
|
||
| networks: | ||
| kubeorchestra-net: | ||
| driver: bridge | ||
| name: kubeorchestra-network | ||
|
|
||
| services: | ||
| mongodb: | ||
| image: mongo:8.0 | ||
| container_name: kubeorchestra-mongodb | ||
| restart: unless-stopped | ||
| networks: | ||
| - kubeorchestra-net | ||
| environment: | ||
| MONGO_INITDB_DATABASE: kubeorchestra | ||
| ports: | ||
| - "27017:27017" | ||
| expose: | ||
| - "27017" | ||
| volumes: | ||
| - mongodb_data:/data/db | ||
| - mongodb_config:/data/configdb | ||
| healthcheck: | ||
| test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"] | ||
| interval: 10s | ||
| timeout: 5s | ||
| retries: 5 | ||
| start_period: 10s | ||
|
|
||
| core: | ||
| image: ghcr.io/kubeorch/core:latest | ||
| container_name: kubeorchestra-core | ||
| restart: unless-stopped | ||
| networks: | ||
| - kubeorchestra-net | ||
| ports: | ||
| - "3000:3000" | ||
| expose: | ||
| - "3000" | ||
| environment: | ||
| MONGO_URI: mongodb://mongodb:27017/kubeorchestra | ||
| MONGO_DB_NAME: kubeorchestra | ||
| depends_on: | ||
| mongodb: | ||
| condition: service_healthy | ||
|
|
||
| ui: | ||
| image: ghcr.io/kubeorch/ui:latest | ||
| container_name: kubeorchestra-ui | ||
| restart: unless-stopped | ||
| networks: | ||
| - kubeorchestra-net | ||
| ports: | ||
| - "3001:3001" | ||
| expose: | ||
| - "3001" | ||
| environment: | ||
| NEXT_PUBLIC_API_URL: http://localhost:3000 | ||
| API_URL_INTERNAL: http://core:3000 | ||
| depends_on: | ||
| - core | ||
|
|
||
| volumes: | ||
| mongodb_data: | ||
| name: kubeorchestra_mongodb_data | ||
| mongodb_config: | ||
| name: kubeorchestra_mongodb_config |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| package cmd | ||
|
|
||
| import "embed" | ||
|
|
||
| //go:embed docker/* | ||
| var embeddedComposeFiles embed.FS | ||
|
|
||
| //go:embed templates/config.yaml | ||
| var configTemplate string | ||
|
|
||
| //go:embed templates/env.local | ||
| var envLocalTemplate string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.