2016-04-29 19:44:49 -04:00
|
|
|
# Variables can be overridden by setting environment variables
|
|
|
|
|
|
|
|
FACTORIO_PATH ?= ~/.factorio
|
|
|
|
SECURITY_PATH ?= $(FACTORIO_PATH)/security
|
|
|
|
SAVES_PATH ?= $(FACTORIO_PATH)/saves
|
|
|
|
MODS_PATH ?= $(FACTORIO_PATH)/mods
|
|
|
|
PORT_FORWARD ?= -p 80:80 -p 443:443 -p 34197:34197/udp
|
|
|
|
|
2016-04-28 09:58:02 -04:00
|
|
|
build:
|
|
|
|
docker build -t factorio-server-manager .
|
|
|
|
|
2016-04-29 20:58:28 -04:00
|
|
|
logs:
|
|
|
|
docker logs factorio-server
|
2016-04-29 23:38:55 -04:00
|
|
|
echo "Nginx Access Logs"
|
|
|
|
docker exec -it factorio-server cat /var/log/nginx/access.log
|
|
|
|
echo "Nginx Error Logs"
|
|
|
|
docker exec -it factorio-server cat /var/log/nginx/error.log
|
2016-04-29 20:58:28 -04:00
|
|
|
|
2016-04-28 09:58:02 -04:00
|
|
|
run:
|
2016-09-28 16:14:05 -03:00
|
|
|
docker run -d --name factorio-server -v $(SECURITY_PATH):/security -v $(SAVES_PATH):/opt/factorio/saves -v $(MODS_PATH):/opt/factorio/mods $(PORT_FORWARD) factorio-server-manager
|
2016-04-29 20:58:28 -04:00
|
|
|
|
|
|
|
stop:
|
|
|
|
docker stop factorio-server
|
|
|
|
docker rm factorio-server
|
|
|
|
|
|
|
|
clean:
|
|
|
|
docker rmi factorio-server-manager
|