NorbiPeti
453720ddde
It took a while to properly mount the folder to both containers Might be a bit overcomplicated but whatever At the moment it creates the volume at /mcserver on the host
37 lines
724 B
YAML
37 lines
724 B
YAML
services:
|
|
server1:
|
|
build:
|
|
context: ..
|
|
dockerfile: .docker/server/Dockerfile
|
|
volumes:
|
|
- dockermc:/mcserver
|
|
environment:
|
|
- MC_SERVER=server1
|
|
image: dockermc-server
|
|
networks:
|
|
default:
|
|
aliases:
|
|
- server1
|
|
container_name: mc-server1
|
|
server2:
|
|
build:
|
|
context: ..
|
|
dockerfile: .docker/server/Dockerfile
|
|
volumes:
|
|
- dockermc:/mcserver
|
|
environment:
|
|
- MC_SERVER=server2
|
|
image: dockermc-server
|
|
networks:
|
|
default:
|
|
aliases:
|
|
- server2
|
|
container_name: mc-server2
|
|
volumes:
|
|
dockermc:
|
|
name: dockermc
|
|
driver: local
|
|
driver_opts:
|
|
type: none
|
|
o: bind
|
|
device: ../mcserver
|