diff --git a/README.md b/README.md index 22c5da7..28fad36 100644 --- a/README.md +++ b/README.md @@ -79,10 +79,10 @@ Deploy your own private relay server using our official image: docker pull ghcr.io/shik3i/koalasync:latest # Or use our example compose file -cp docker-compose.example.yml docker-compose.yml +cp docker-compose.caddy.example.yml docker-compose.yml docker-compose up -d ``` -The server will be available at `ws://localhost:3000`. See [docker-compose.example.yml](docker-compose.example.yml) for advanced configuration. +The server will be available at `ws://localhost:3000`. See [docker-compose.caddy.example.yml — Docker network](docker-compose.caddy.example.yml) or [docker-compose.ip.example.yml — Static IP](docker-compose.ip.example.yml) for ready-to-use Docker Compose files. To connect your extension to a self-hosted server, open the popup → **Room** tab → select **Custom Server** → enter your server's WebSocket URL (e.g., `ws://localhost:3000`). diff --git a/docker-compose.caddy.example.yml b/docker-compose.caddy.example.yml new file mode 100644 index 0000000..8ea7619 --- /dev/null +++ b/docker-compose.caddy.example.yml @@ -0,0 +1,17 @@ +services: # Top-level key defining all containers in this Compose file + koala-sync: # Name of the KoalaSync service + image: ghcr.io/shik3i/koalasync:latest # Pulls the latest KoalaSync image from GitHub Container Registry + container_name: KoalaSync # Sets a fixed container name instead of an auto-generated one + restart: always # Always restart the container if it stops or if Docker starts + environment: # Environment variables passed into the container + - TZ=Europe/Berlin # Sets the timezone inside the container + - PORT=3000 # Port KoalaSync listens on inside the container + - MIN_VERSION=1.0.0 # Minimum client version allowed to connect + - MAX_ROOMS=100 # Maximum number of rooms that can exist + - MAX_PEERS_PER_ROOM=50 # Maximum number of peers allowed per room + pids_limit: 2048 # Limits the container to 2048 process IDs for safety + networks: # Attaches the service to the networks listed below + - caddy_net # Joins the pre-existing Caddy network for reverse proxying +networks: # Top-level networks definition + caddy_net: # Network name as referenced by the service + external: true # Marks the network as managed outside of Compose (created by Caddy) diff --git a/docker-compose.example.yml b/docker-compose.example.yml deleted file mode 100644 index 72683c7..0000000 --- a/docker-compose.example.yml +++ /dev/null @@ -1,25 +0,0 @@ -services: - koala-sync: - image: ghcr.io/shik3i/koalasync:latest - container_name: KoalaSync - restart: always - ports: - - "3000:3000" - environment: - - TZ=Europe/Berlin - - PORT=3000 - - MIN_VERSION=1.0.0 - - MAX_ROOMS=100 - - MAX_PEERS_PER_ROOM=50 - # KoalaSync uses in-memory storage for the relay, - # so no persistent database volume is required. - pids_limit: 2048 - # Example for custom network (e.g., Unraid/Macvlan) - # networks: - # custom_network: - # ipv4_address: 192.168.1.XXX - -# networks: -# custom_network: -# external: true -# name: br0 diff --git a/docker-compose.ip.example.yml b/docker-compose.ip.example.yml new file mode 100644 index 0000000..66227c4 --- /dev/null +++ b/docker-compose.ip.example.yml @@ -0,0 +1,21 @@ +services: # Top-level key defining all containers in this Compose file + koala-sync: # Name of the KoalaSync service + image: ghcr.io/shik3i/koalasync:latest # Pulls the latest KoalaSync image from GitHub Container Registry + container_name: KoalaSync # Sets a fixed container name instead of an auto-generated one + restart: always # Always restart the container if it stops or if Docker starts + ports: # Exposes the container port to the host + - "3000:3000" # Maps host port 3000 to container port 3000 + environment: # Environment variables passed into the container + - TZ=Europe/Berlin # Sets the timezone inside the container + - PORT=3000 # Port KoalaSync listens on inside the container + - MIN_VERSION=1.0.0 # Minimum client version allowed to connect + - MAX_ROOMS=100 # Maximum number of rooms that can exist + - MAX_PEERS_PER_ROOM=50 # Maximum number of peers allowed per room + pids_limit: 2048 # Limits the container to 2048 process IDs for safety + networks: # Attaches the service to the networks listed below + bond0_network: # Network name as referenced by the service + ipv4_address: 192.168.1.XXX # Static IPv4 address for the KoalaSync container +networks: # Top-level networks definition + bond0_network: # Network name inside Compose + external: true # Marks the network as managed outside of Compose + name: bond0 # Name of the pre-existing network on the Docker host diff --git a/server/README.md b/server/README.md index db816ad..977a9fb 100644 --- a/server/README.md +++ b/server/README.md @@ -27,7 +27,7 @@ docker pull ghcr.io/shik3i/koalasync:latest # Or build from the repository root docker build -t koala-sync-server -f server/Dockerfile . ``` -See [docker-compose.example.yml](../docker-compose.example.yml) in the root directory for a ready-to-use configuration. +See [docker-compose.caddy.example.yml — Docker network](../docker-compose.caddy.example.yml) or [docker-compose.ip.example.yml — Static IP](../docker-compose.ip.example.yml) in the root directory for ready-to-use Docker Compose files. ### Manual Setup ```bash