mirror of
https://github.com/YuzuZensai/Minikura.git
synced 2026-01-31 14:57:49 +00:00
📦 build: Add devcontainer for local Kubernetes development
This commit is contained in:
55
.devcontainer/docker-compose.yml
Normal file
55
.devcontainer/docker-compose.yml
Normal file
@@ -0,0 +1,55 @@
|
||||
name: "minikura-devcontainer"
|
||||
services:
|
||||
devcontainer:
|
||||
tty: true
|
||||
privileged: true
|
||||
cgroup: host
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
HOST_UID: ${HOST_UID:-1000}
|
||||
HOST_GID: ${HOST_GID:-1000}
|
||||
tmpfs:
|
||||
- /var/lib/docker:mode=0777,dev,size=15g,suid,exec
|
||||
- /var/lib/rancher:mode=0777,dev,size=15g,suid,exec
|
||||
- /run
|
||||
ports:
|
||||
- "3000:3000" # backend API
|
||||
- "3001:3001" # web frontend
|
||||
- "6443:6443" # k3s API
|
||||
- "25565:25565" # minecraft
|
||||
- "25577:25577" # velocity
|
||||
volumes:
|
||||
- "../:/workspace"
|
||||
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
|
||||
working_dir: "/workspace"
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- KUBECONFIG=/home/dev/.kube/config
|
||||
- DATABASE_URL=postgresql://postgres:postgres@db:5432/minikura?sslmode=disable
|
||||
- KUBERNETES_NAMESPACE=minikura
|
||||
- KUBERNETES_SKIP_TLS_VERIFY=true
|
||||
- ENABLE_CRD_REFLECTION=true
|
||||
|
||||
db:
|
||||
image: postgres:17
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: minikura
|
||||
volumes:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
ports:
|
||||
- "5433:5432"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
volumes:
|
||||
postgres-data:
|
||||
Reference in New Issue
Block a user