Last active
May 3, 2020 07:03
-
-
Save aayushdutt/3f30d3475de38f1153c1379f7b0fe9d5 to your computer and use it in GitHub Desktop.
A docker-compose file for creating Minecraft servers effortlessly
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
version: "3" | |
services: | |
minecraft: | |
image: itzg/minecraft-server | |
ports: | |
- "1000:25565" | |
volumes: | |
- "./mc:/data" | |
environment: | |
MODE: "survival" | |
ONLINE_MODE: "FALSE" | |
MOTD: "Hostile Minecraft server by Quasar" | |
OPS: "quasar,lgycre" | |
ICON: "https://github.com/aayushdutt/aayushdutt.com/raw/master/assets/images/logo-black.png" | |
PVP: "false" | |
EULA: "TRUE" | |
ENABLE_RCON: "true" | |
RCON_PASSWORD: "qwerty123" | |
RCON_PORT: 28016 | |
# enable env variable replacement | |
REPLACE_ENV_VARIABLES: "TRUE" | |
# define an optional prefix for your env variables you want to replace | |
ENV_VARIABLE_PREFIX: "CFG_" | |
# and here are the actual variables | |
CFG_DB_HOST: "http://localhost:3306" | |
CFG_DB_NAME: "minecraft" | |
CFG_DB_PASSWORD: "qwerty123" | |
restart: unless-stopped | |
rcon: | |
image: itzg/rcon | |
ports: | |
- "4326:4326" | |
- "4327:4327" | |
volumes: | |
- "./rcon:/opt/rcon-web-admin/db" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment