Skip to content

Commit e9421dc

Browse files
committed
improve Docker docs
1 parent ab8d769 commit e9421dc

1 file changed

Lines changed: 4 additions & 28 deletions

File tree

README.md

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -132,36 +132,12 @@ You can build a Docker image using the provided [`Dockerfile`](./Dockerfile).
132132
docker build -t pwmp-server .
133133
```
134134

135-
You can test the container using the following command:
136-
```sh
137-
# Note that the config already exists on the host!
138-
docker run --rm -it -v ~/.pwmp-server:/app/data:ro pwmp-server
139-
```
135+
Use the included `docker-compose.yml` for a production-ready setup with PostgreSQL and several hardened options. **Do not forget to change the database credentials!** The binary is located at `/app/pwmp-server` in the container, and the configuration file path is set to `/app/data/config.yml`.
140136

141-
Alternatively, here is a minimal `docker-compose.yml` example:
142-
```yaml
143-
services:
144-
pwmp-server:
145-
image: ghcr.io/pixelweatherproject/pwmp-server:latest
146-
command: "--debug"
147-
logging:
148-
driver: json-file
149-
options:
150-
max-size: "10m"
151-
max-file: "5"
152-
deploy:
153-
resources:
154-
limits:
155-
cpus: 1.0
156-
memory: 1024M
157-
ports:
158-
- "55300:55300/tcp"
159-
volumes:
160-
- ./config.yml:/app/data/config.yml:ro
161-
restart: unless-stopped
137+
To run the necessary database migrations, you can use the following command:
138+
```sh
139+
docker compose exec pwmp-server /app/pwmp-server --config /app/data/config.yml database init
162140
```
163141

164-
> **Note**: The above example is minimal and does not include a database container. You will need to set up a separate container for the database and configure the server accordingly.
165-
166142
## Proxies
167143
The server has been tested behind a reverse proxy using Nginx Proxy Manager stream, however, it caused some level of instability. Using reverse proxies is not recommended, as they may interfere with the custom socket optimizations.

0 commit comments

Comments
 (0)