]> jfr.im git - irc/UndernetIRC/undernet-development-env.git/blob - README.md
Correct the README about rebuilding and restarting services
[irc/UndernetIRC/undernet-development-env.git] / README.md
1 UnderNET Development Environment
2 ================================
3 > **Warning**
4 >
5 > Do _**NOT**_ use this in production, it is not safe and contains publicly shared credentials!
6
7 This repository contain a docker based development environment for UnderNET.
8
9 It includes the following services:
10
11 - hub (ircu2)
12 - leaf server (ircu2)
13 - PostgreSQL database
14 - mail server (mailhog)
15 - cservice web portal
16 - GNUworld (enabled modules: cservice, ccontrol, openchanfix, dronescan)
17
18
19 # Requirements to setup the environment
20
21 - [Docker](https://www.docker.com/)
22 - [docker-compose](https://docs.docker.com/compose/)
23
24
25 # Getting started
26
27 This project uses git submodules. After cloning this repository the submodules needs to be
28 initialized and updated. Follow this step-by-step guide to get your new UnderNET environment
29 up and running.
30
31 ```
32 git clone https://github.com/Ratler/undernet-development-env.git
33 cd undernet-development-env
34 git submodule init
35 git submodule update
36 docker-compose up -d
37 ```
38
39 ## Service information (hosts, ports and login information)
40
41 The following ports below are mapped from your host to the container:
42
43 | Service | URL / ip:port | Comments |
44 |--------------|------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
45 | hub | Server: localhost:4400 <br> Client: localhost:6669 | The default `/oper` username is `admin` with the password `admin` |
46 | leaf | Server: localhost:4401 <br> Client: localhost:6667 | The default `/oper` username is `admin` with the password `admin` |
47 | db | localhost:5432 | The default db username is `cservice` with the password `cservice`, works for all the databases. <br> Databases: `cservice`, `ccontrol`, `chanfix`, `dronescan`, `local_db` |
48 | mail | SMTP: localhost:1025 <br> WEB: http://localhost:8025 | Captures e-mails from cservice-web, <br>e-mails can be accessed from the WEB url. |
49 | cservice-web | http://localhost:8080 | Default admin (level 1000) user is `Admin` with the password `temPass2020@` |
50
51
52 # Configuration
53
54 The configuration for the `hub`, `leaf` and `gnuworld` can be changed in the folder `etc/`.
55 All the files are mounted inside the container as volumes, so any change done on your host
56 is reflected in the container immediately. For example after changing `etc/hub.conf`, just
57 `/rehash` the IRC server to apply the changes.
58
59 For the service `cservice-web` the configuration can be changed from `cservice-web/php_includes`. Any configuration
60 or code change will be applied immediately.
61
62 # Making code changes in ircu or gnuworld
63
64 After making any code change in either ircu or gnuworld the container need to be rebuilt and restarted.
65
66 Rebuild ircu (hub and leaf share the same image):
67 ```
68 docker-compose up --build hub
69 docker-compose up leaf
70 ```
71
72 Rebuild and restart gnuworld:
73 ```
74 docker-compose up --build gnuworld
75 ```
76
77 # PostgreSQL databases
78
79 ## Data persistence
80
81 All databases are persisted by using a docker volume. To list existing volumes run `docker volume ls`.
82 To reset all databases you can delete the volume by running `docker volume rm undernet-development-env_pgdata`,
83 and then restart the `db` service to recreate all databases.
84
85
86 # FAQ
87 Q: Why do I see this message _"X (cservice@undernet.org): AUTHENTICATION FAILED as <user>
88 (Unable to login during reconnection, please try again in 295 seconds)"_ when trying to
89 authenticate with `x@channels.undernet.org`?
90
91 A: This is a burst connection mechanism in GNUworld which happen when it links to its hub.
92 Just wait for it to complete and try again. Or you can change the setting `login_delay` in
93 `etc/gnuworld/cservice.conf`, it's currently set to 5 seconds.
94
95 Q: Why am I getting _"X (cservice@undernet.org): AUTHENTICATION FAILED as Admin (IPR)"_ when I try to
96 authenticate with the `x@channels.undernet.org` with the `Admin` user?
97
98 A: Access IP restrictions are applied to the Admin user, to fix this, login to the `cservice-web`, and
99 change `Access IP restrictions (ACL+)` by adding the ip address `10.5.0.1`.