-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update ZNC documentation in content.md for docker compose #2441
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -6,7 +6,7 @@ ZNC is an IRC network bouncer (BNC). It can detach the client from the actual IR | |||||
|
||||||
[ZNC Wiki](http://znc.in/) | ||||||
|
||||||
# How to use this image | ||||||
## How to use this image | ||||||
|
||||||
ZNC in this image stores its configuration in `/znc-data`. If you have existing configuration, you can reuse it with `-v $HOME/.znc:/znc-data`. Alternatively, you can create a new config in a volume or in a local dir. The examples below assumes a volume named `znc-cfg`. | ||||||
|
||||||
|
@@ -25,3 +25,58 @@ The port (12345 in the example above) should match the port you used during `--m | |||||
If you use any external module, put the .cpp, .py or .pm file to `/znc-data/modules` (you may need to create that directory). | ||||||
|
||||||
This image contains the latest released version. If you want the bleeding edge (unstable) version, it's at [zncbouncer/znc-git](https://hub.docker.com/r/zncbouncer/znc-git). | ||||||
|
||||||
## Install using [`docker-compose`](https://github.com/docker/compose) | ||||||
|
||||||
Example `docker-compose.yml` for `znc`: | ||||||
|
||||||
```yaml | ||||||
znc: | ||||||
image: znc:latest | ||||||
container_name: znc | ||||||
volumes: | ||||||
- /your/local/znc-data:/znc-data | ||||||
ports: | ||||||
- 12345:12345 | ||||||
restart: unless-stopped | ||||||
``` | ||||||
|
||||||
Then run with `docker-compose up -d`, and when initialized go to `http://dockerhost:12345` | ||||||
Comment on lines
+29
to
+44
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one should probably follow our standard |
||||||
|
||||||
### Running ZNC for first time (No config) | ||||||
|
||||||
If this is your first time running ZNC (and have no configuration file), use the following `docker-compose.yml`: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For this one-off run, I don't see how docker-compose is any better than the docker run command from above. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thats true. Maybe should just update it to explain the process first? i.e. explain that its required before you setup the docker-compose or something? |
||||||
|
||||||
```yaml | ||||||
znc: | ||||||
image: znc:latest | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since this one won't be able to follow that pattern, it can take advantage of our templating (so that it's correct on the per-architecture image pages too):
Suggested change
|
||||||
container_name: znc | ||||||
volumes: | ||||||
- /your/local/znc-data:/znc-data | ||||||
ports: | ||||||
- 12345:12345 | ||||||
restart: unless-stopped | ||||||
|
||||||
#Additional settings required for first run | ||||||
command: ["--makeconf"] | ||||||
tty: true | ||||||
stdin_open: true | ||||||
``` | ||||||
|
||||||
Next run the container with `docker-compose run`. This should then run you through the initial configuration setup. Once this is completed, stop the container using `docker-compose stop znc`. Remove the settings below `#Additional settings required for first run` and then recreate/start the container again using `docker-compose up -d`. | ||||||
|
||||||
## Troubleshooting | ||||||
|
||||||
If you get permission errors on the local volume set the uid and pid in the compose file as follows (where `1000` is your uid and `100` your gid): | ||||||
|
||||||
```yaml | ||||||
znc: | ||||||
image: znc:latest | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
(same as above) |
||||||
container_name: znc | ||||||
user: 1000:100 #User settings | ||||||
volumes: | ||||||
- /your/local/znc-data:/znc-data | ||||||
ports: | ||||||
- 12345:12345 | ||||||
restart: unless-stopped | ||||||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was wrong with header?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just being pedantic. Only single top line heading