-
Notifications
You must be signed in to change notification settings - Fork 268
feat: add Minepanel template #655
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| services: | ||
| backend: | ||
| image: ketbom/minepanel-backend:1.7.1 | ||
| restart: unless-stopped | ||
| environment: | ||
| - NODE_ENV=production | ||
| - FRONTEND_URL=${FRONTEND_URL} | ||
| - JWT_SECRET=${JWT_SECRET} | ||
| - CLIENT_PASSWORD=${CLIENT_PASSWORD} | ||
| - CLIENT_USERNAME=${CLIENT_USERNAME} | ||
| - BASE_DIR=${BASE_DIR} | ||
| volumes: | ||
| - minepanel-servers:/app/servers | ||
| - minepanel-data:/app/data | ||
| - /var/run/docker.sock:/var/run/docker.sock | ||
|
|
||
| frontend: | ||
| image: ketbom/minepanel-frontend:1.7.1 | ||
| restart: unless-stopped | ||
| environment: | ||
| - NEXT_PUBLIC_BACKEND_URL=${NEXT_PUBLIC_BACKEND_URL} | ||
| - NEXT_PUBLIC_DEFAULT_LANGUAGE=${NEXT_PUBLIC_DEFAULT_LANGUAGE} | ||
| depends_on: | ||
| - backend | ||
|
|
||
| volumes: | ||
| minepanel-servers: | ||
| minepanel-data: | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,29 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| [variables] | ||||||||||||||||||||||||||||||||||||||||||||||||||
| frontend_domain = "${domain}" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| backend_domain = "${domain}" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| jwt_secret = "${base64:32}" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| client_username = "admin" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| client_password = "${password:16}" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| default_language = "en" | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| [config] | ||||||||||||||||||||||||||||||||||||||||||||||||||
| mounts = [] | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| [[config.domains]] | ||||||||||||||||||||||||||||||||||||||||||||||||||
| serviceName = "frontend" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| port = 3_000 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| host = "${frontend_domain}" | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| [[config.domains]] | ||||||||||||||||||||||||||||||||||||||||||||||||||
| serviceName = "backend" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| port = 8_091 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| host = "api-${backend_domain}" | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| [config.env] | ||||||||||||||||||||||||||||||||||||||||||||||||||
| JWT_SECRET = "${jwt_secret}" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| CLIENT_USERNAME = "${client_username}" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| CLIENT_PASSWORD = "${client_password}" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| FRONTEND_URL = "http://${frontend_domain}" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| NEXT_PUBLIC_BACKEND_URL = "http://api-${backend_domain}" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| NEXT_PUBLIC_DEFAULT_LANGUAGE = "${default_language}" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| BASE_DIR = "/app" | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+22
to
+29
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| [config.env] | |
| JWT_SECRET = "${jwt_secret}" | |
| CLIENT_USERNAME = "${client_username}" | |
| CLIENT_PASSWORD = "${client_password}" | |
| FRONTEND_URL = "http://${frontend_domain}" | |
| NEXT_PUBLIC_BACKEND_URL = "http://api-${backend_domain}" | |
| NEXT_PUBLIC_DEFAULT_LANGUAGE = "${default_language}" | |
| BASE_DIR = "/app" | |
| [[config.env]] | |
| serviceName = "backend" | |
| env = [ | |
| "JWT_SECRET=${jwt_secret}", | |
| "CLIENT_USERNAME=${client_username}", | |
| "CLIENT_PASSWORD=${client_password}", | |
| "FRONTEND_URL=http://${frontend_domain}", | |
| "BASE_DIR=/app", | |
| ] | |
| [[config.env]] | |
| serviceName = "frontend" | |
| env = [ | |
| "NEXT_PUBLIC_BACKEND_URL=http://api-${backend_domain}", | |
| "NEXT_PUBLIC_DEFAULT_LANGUAGE=${default_language}", | |
| ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mounting the Docker socket grants the container full control over the host's Docker daemon, which is a significant security risk. While this may be necessary for Minepanel's functionality to manage Minecraft server containers, this creates a potential privilege escalation vector. Consider documenting this security implication in the template description or adding a warning comment in the docker-compose.yml file.