diff --git a/minepanel.env b/minepanel.env new file mode 100644 index 0000000..97d2f06 --- /dev/null +++ b/minepanel.env @@ -0,0 +1,5 @@ +JWT_SECRET= # Generate with: openssl rand -base64 32 +CLIENT_USERNAME= +CLIENT_PASSWORD= +BASE_DIR= +NEXT_PUBLIC_DEFAULT_LANGUAGE=en \ No newline at end of file diff --git a/minepanel.yaml b/minepanel.yaml new file mode 100644 index 0000000..30adca2 --- /dev/null +++ b/minepanel.yaml @@ -0,0 +1,90 @@ +## You need add env variables from minepanel.env + +services: + backend: + image: ketbom/minepanel-backend:latest + container_name: minepanel-backend + environment: + - NODE_ENV=production + - FRONTEND_URL= + - JWT_SECRET=${JWT_SECRET} + - CLIENT_PASSWORD=${CLIENT_PASSWORD:-admin} + - CLIENT_USERNAME=${CLIENT_USERNAME:-admin} + - BASE_DIR=${BASE_DIR:-$PWD} + volumes: + - ${BASE_DIR:-$PWD}/servers:/app/servers + - /var/run/docker.sock:/var/run/docker.sock + - ${BASE_DIR:-$PWD}/data:/app/data + # - :/backups # Uncomment, and change to a real path, if you need backups + networks: + minepanel-network: + frontend: + ipv4_address: + restart: unless-stopped + healthcheck: + test: ["CMD", "node", "-e", "require('http').get('http://localhost:8091/health', (r) => process.exit(r.statusCode === 200 ? 0 : 1))"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 15s + deploy: + resources: + limits: + cpus: '1.0' + memory: 1G + reservations: + cpus: '0.25' + memory: 256M + + frontend: + image: ketbom/minepanel-frontend:latest + container_name: minepanel-frontend + environment: + - NEXT_PUBLIC_BACKEND_URL= + - NEXT_PUBLIC_DEFAULT_LANGUAGE=${NEXT_PUBLIC_DEFAULT_LANGUAGE:-en} + depends_on: + backend: + condition: service_healthy + networks: + minepanel-network: + frontend: + ipv4_address: + restart: unless-stopped + healthcheck: + test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000', (r) => process.exit(r.statusCode === 200 ? 0 : 1))"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 20s + deploy: + resources: + limits: + cpus: '0.5' + memory: 512M + reservations: + cpus: '0.1' + memory: 128M + + mc-router: + image: itzg/mc-router:1.39.1 + container_name: mc-router + ports: + - '25565:25565' + environment: + - ROUTES_CONFIG=/data/routes.json + - ROUTES_CONFIG_WATCH=true + volumes: + - ${BASE_DIR:-$PWD}/data/proxy:/data + networks: + minepanel-network: + restart: unless-stopped + +networks: + frontend: + external: true + name: + + # DO NOT CHANGE THIS NETWORK! + minepanel-network: + name: minepanel-network + # DO NOT CHANGE THIS NETWORK!