Commit graph

25 commits

Author SHA1 Message Date
02a121e0b8 Add a forwarder for Factorio servers that don't run in Docker
The mod prints its packets to the server's standard output, and Docker's
syslog log driver sends them to Kafkatorio. kafkatorio-forward.py does
the same without Docker: it runs the server (or reads its output from a
pipe), prints the output as usual, and sends the mod's packets to the
syslog port in the same format as Docker, tagged with the token.

- the server keeps running when Kafkatorio is unreachable: packets wait in
  a bounded buffer, and are sent after reconnecting
- before each send it checks Kafkatorio hasn't closed the connection, so
  lines aren't silently lost in a dead socket
- Ctrl+C and SIGTERM are passed to the server once, so it saves and stops
- the token is read from a file or the environment, not the command line
- only the Python standard library

util-linux's logger can't be used instead: it rejects the token, which is
longer than syslog's 48 character APP-NAME limit.

Tested on Linux with a Factorio 2.0.77 server: packets arrive, the
forwarder reconnects when the syslog server restarts (no packets lost),
and the server saves when stopped.

The guide has a section for it, with a systemd service example, and the
README no longer says the Factorio server must run in Docker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 11:00:24 +01:00
a6be36df2e Rewrite the README and setup guide, and fix the example Compose setup
The README describes what Kafkatorio does now (the live map, production
and research pages), that this is a Factorio 2.0 fork, and how the
services fit together.

The guide is rewritten as numbered steps, from building the images to a
public website: configuration, creating the server's token locally
(instead of typing the secret into jwt.io), connecting the Factorio
server's log, sending the existing map, exporting icons and names, and
the reverse proxy. Also: the Unraid setup, updating, and troubleshooting.

It warns that the mod portal's kafkatorio-events is the original, for
Factorio 1.1, with overlapping version numbers, so players must install
the mod zip by hand.

The example docker-compose.yml lost all data when containers were
recreated (e.g. on every update), and exposed Kafka, which has no
authentication, on all interfaces. It's now based on the Unraid setup:
Kafka data, map tiles, state and icons are kept next to it, only the
website is exposed, and the optional Factorio server (--profile factorio)
starts after the syslog server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 10:36:01 +01:00
Adam
65ae467733 add some nice shields 2022-10-30 20:32:21 +01:00
Adam
30d5a67a2a update license to be gpl-3.0 2022-10-30 18:58:50 +01:00
Adam
c54481010a readme tweaks 2022-10-30 18:53:21 +01:00
Adam
5bb8cc789c add/update docs 2022-10-30 17:21:32 +01:00
Adam
de419aeae8 web-map tidy up, and add diagram to README 2022-09-03 11:15:43 +02:00
Adam
ddfd14f6d6 update readme (better description, TODOs were moved to issue board) 2022-07-17 14:20:28 +02:00
Adam
98c585b201 map tiles notes 2022-05-15 12:24:19 +02:00
Adam
fff143fcc3 binser for lua encoding? 2022-05-14 13:10:54 +02:00
Adam
e12e98ee71 update readme overview 2022-02-20 12:30:45 +01:00
Adam
11cbb89821 tweaking map scale/zoom 2022-02-09 10:45:44 +01:00
Adam
123cdb5e9a vlc save cmds 2022-02-08 17:56:49 +01:00
Adam
a557c437cc tiles are visible! the tileserver works! they're the right way up! they have colours! 2022-01-19 22:42:22 +01:00
Adam
49ad3654a3 tiles from kafka -> image tiles... maybe??? 2022-01-13 00:00:59 +01:00
Adam
4efd912f75 binser for lua encode? 2022-01-08 23:10:27 +01:00
Adam
58233c9343 - mod refactoring into separate files, specific dirs
- start work on emitting prototypes
- start preparing for generating map tiles for leaflet
- start work on more events
  - console chat
  - chunk charted
2022-01-06 09:16:44 +01:00
Adam
a0c330384a it is literally working 2022-01-04 15:09:50 +01:00
Adam
6d60428ab9 added kvision web-map, cleaning up a few gradle things (tokens) 2021-12-06 22:15:26 +01:00
Adam
42b60ac0c3 factorio -> event -> mod -> console -> kafka pipe -> kafka -> event processor working!!!!!!!!!!!!!!!!!! 2021-12-03 09:11:55 +01:00
Adam
d6a9a58dc9 kotlin 1.6, gradle tidying 2021-11-26 14:40:57 +01:00
Adam
31ae0c9800 kotlin gen working (again!), and source sets working 2021-10-30 18:35:39 +02:00
Adam
9447dce307 add some todo links to readme 2021-10-25 23:23:05 +02:00
Adam
2e15f83c90 readme, convert factorio objects to tables, other refactors 2021-10-20 00:51:35 +02:00
Adam
c3ac3bd34a mucking around with sockets and rcon 2021-10-15 23:43:42 +02:00