Add nginx on docker to readme.

pull/111/head
moneroexamples 6 years ago
parent c9bfc53da7
commit 991583c1ec

@ -144,35 +144,19 @@ Assuming we are still in `build` folder:
mysql -p -u root < ../sql/openmonero.sql
```
#### Lighttpd and frontend
#### Nginx
```bash
sudo apt-get install lighttpd
```
Assuming you are still in `build` folder, copy frontend source files into lighttpd www folder.
The fastest way to start up and server the frontend is through
using [nginx docker image](https://hub.docker.com/_/nginx/)
(assuming that you have docker setup and running).
```bash
sudo mkdir /var/www/html/openmonero
sudo cp -rvf ../html/* /var/www/html/openmonero/
```
Setup document root in `lighttpd.conf` into openmonero folder
```bash
sudo vim /etc/lighttpd/lighttpd.conf
docker run --name omhtml -p 80:80 -v /home/mwo/openmonero/html:/usr/share/nginx/html:ro -d nginx
```
and change `server.document-root` into:
```bash
server.document-root = "/var/www/html/openmonero"
```
Restart lighttpd to see the change:
```bash
sudo systemctl restart lighttpd
```
where `omhtml` is docker container name, `80:80` will expose the frontend
on port 80 of the localhost, and `/home/mwo/openmonero/html` is the location on your host computer where the
frontend files are stored. All these can be changed to suit your requirements.
Go to localhost (http://127.0.0.1) and check if frontend is working.

@ -20,7 +20,7 @@ public:
enum class StopReason {NotYetStopped, PingFailed, PointerExpired};
MysqlPing(std::shared_ptr<MySqlConnector> _conn, uint64_t _ping_time = 7200);
MysqlPing(std::shared_ptr<MySqlConnector> _conn, uint64_t _ping_time = 3600);
void operator()();
void stop() {keep_looping = false;}

Loading…
Cancel
Save