#0000 - Create Docker setup for Factorio server

Added a `docker-compose.yml` for the Factorio game server, including volume mappings and port configurations. Introduced `.gitignore` to manage data folder exclusions. Updated `README.md` with setup instructions and licensing details.
This commit is contained in:
Guillaume "B.B." Van Hemmen 2024-10-22 19:15:18 +02:00
parent 7590efeb4f
commit aba5f03fb3
5 changed files with 110 additions and 1 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
data/*
!data/.gitkeep

21
LICENCE Normal file
View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2024 Guillaume 'B.B.' Van Hemmen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -1,2 +1,65 @@
# factorio # Factorio
## Introduction
This repository is a Docker Compose setup based on the work
from [factoriotools/factorio-docker](https://github.com/factoriotools/factorio-docker). Please consult their repository
for the full source and documentation.
[Factorio](https://www.factorio.com) is a game where you build and maintain factories. You will mine resources, research
technologies, build infrastructure, automate production, and fight enemies. Use your imagination to design your factory,
combine simple elements into ingenious structures, apply management skills to keep it working, and protect it from
creatures who don't really like you.
The game is stable and optimized for building massive factories. You can create your own maps, write mods in Lua, or
play with friends via multiplayer.
## Table of Contents
- [Introduction](#introduction)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Usage](#usage)
- [License](#license)
## Prerequisites
- **Docker**: Ensure Docker is installed and running on your system.
- **Docker Compose**: Docker Compose is required to orchestrate the container setup.
## Installation
1. Clone the repository:
```bash
git clone https://git.van-hemmen.com/GuillaumeHemmen-DockerCompose-Infra/factorio.git
cd factorio
```
2. Ensure that the data folder has the proper ownership (use sudo if needed):
```bash
sudo chown 845:845 ./data
```
3. Run the server once:
```bash
docker compose up
```
4. Stop the server:
```bash
docker compose down
```
5. Customize the server via the `server-settings.json` file that appeared in the data folder.
## Usage
Start the Factorio service with Docker Compose:
```bash
docker compose up -d
```
## License
This project is licensed under the terms of the MIT license. See the [LICENSE](LICENSE) file for details.

0
data/.gitkeep Normal file
View file

23
docker-compose.yml Normal file
View file

@ -0,0 +1,23 @@
volumes:
app:
services:
app:
image: factoriotools/factorio:latest
ports:
- target: 34197
published: 34197
protocol: udp
mode: host
- target: 27015
published: 27015
protocol: tcp
mode: host
volumes:
- ./testFolder:/factorio
deploy:
replicas: 1
restart_policy:
condition: any
delay: 5s