Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
79 lines (69 loc) · 3.94 KB
/
Copy pathdocker-compose.yml
File metadata and controls
79 lines (69 loc) · 3.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# SPDX-License-Identifier: MIT AND MPL-2.0
# This file includes DiscoPanel material under the MIT License,
# Copyright (c) 2025 Nicholas W. Heyer. The MIT license text is in LICENSE
# and still applies to that inherited material.
# Maintainer changes are licensed under the Mozilla Public License, v. 2.0.
# If a copy of the MPL was not distributed with this file, You can obtain
# one at https://mozilla.org/MPL/2.0/.
services:
carbon-panel:
image: atharvnaphade/carbonpanel:latest
container_name: carbon-panel
restart: unless-stopped
# Option 1 (RECOMENDED FOR SIMPLICITY): Use host network mode
network_mode: host
# Option 2 (MORE COMPLICATED, ONLY USE IF YOU NEEDED): Use bridge mode with port mapping (default)
#
# NOTE: In bridge mode, Carbon Panel automatically attaches itself to the managed Docker network
# (carbon-panel-network) at startup so it can reach the minecraft server containers it creates.
#
# NOTE: Only specify minecraft server ports (25565 ... etc) for proxied minecraft servers using a hostname.
# Carbon Panel will automatically expose ports needed on the managed minecraft server instances. In other
# words, only the carbon-panel web port is needed + proxy port(s).
# ports:
# - "8080:8080" # Carbon Panel web interface
# - "25565:25565" # Minecraft port/proxy-port
# - "25565-25665:25565-25665/tcp" # Additional ports/proxy-ports if needed
# - "25565-25665:25565-25665/udp" # Also map UDP for some Minecraft features
volumes:
# Docker socket for managing containers
# NOTE FOR FEDORA/RHEL/CENTOS/ETC.: SE Linux requires :z to be added as a suffix to volume mounts. EX: - /var/run/docker.sock:/var/run/docker.sock:z
- /var/run/docker.sock:/var/run/docker.sock
# IMPORTANT: This is where your server(s) data will be stored on the host.
# Set the left-hand side to any absolute path you want to keep. The panel
# reads this mapping from its own container, so there is no matching
# environment variable to keep in sync. Startup refuses to run if the data
# directory is not mounted or not writable, instead of writing worlds into
# the container's own filesystem.
#
# `docker compose down` (without --volumes) stops and removes the panel
# container and leaves these host bind mounts in place. Worlds and the
# controller SQLite file stay on the host. Recreating the container does
# not delete them. Do not add `down -v` to routine scripts.
# Before an image upgrade, snapshot the database with
# scripts/snapshot-panel-db.sh --data-dir <host-data-path>; restore by
# copying that file back onto carbon-panel.db with the panel stopped.
# Recreate onto a newer image with scripts/compose-upgrade.sh (dry-run
# by default; --apply snapshots then `docker compose up -d --pull always`).
# A failed snapshot stops before compose up. Copy-back rollback is
# scripts/compose-upgrade-rollback.sh (not a volume prune).
# Helm and Terraform are not shipped in this repository.
- /opt/carbon-panel/data:/app/data
- /opt/carbon-panel/backups:/app/backups
- /tmp/carbon-panel:/app/tmp
# Configuration file, uncomment if you are using a config file (optional, see config.example.yaml for all available options).
#- ./config.yaml:/app/config.yaml:ro
environment:
- TZ=UTC
# ── Authentication ──────────────────────────
# Local auth (username/password) is on by default.
# You create your first admin account on first login.
#
# Want to let new users sign up on their own?
# - CARBONPANEL_AUTH_LOCAL_ALLOW_REGISTRATION=true
#
# Want single sign-on (OIDC) with Keycloak, Authelia, etc?
# See the oidc/ folder for examples.
# DONT FORGET THIS
extra_hosts:
- "host.docker.internal:host-gateway"