- Create a `.env` file that defime environment variables `SERVER_DOMAIN` and `PEER_ID`:
- In the same folder, create a `.env` file that defime environment variables `SERVER_DOMAIN` and `PEER_ID`:
-`SERVER_DOMAIN`: a domain name that point on your server
```
-`PEER_ID`: Your node peer id, shoud be generated with this command: `docker run --rm -it --entrypoint duniter -v $PWD:/var/lib/duniter/ duniter/duniter-v2s:v0.1.0 key generate-node-key --file /var/lib/duniter/node.key`
SERVER_DOMAIN=YOUR_DOMAIN
PEER_ID=Your node peer id
```
Your `PEER_ID` shoud be generated with this command: `docker run --rm -it --entrypoint duniter -v $PWD:/var/lib/duniter/ duniter/duniter-v2s:v0.1.0 key generate-node-key --file /var/lib/duniter/node.key`
- If you have write access errors run in docker-compose.yml folder : `chmod o+rwX -R .`
- If you have write access errors run in docker-compose.yml folder : `chmod o+rwX -R .`
-`docker-compose up -d` to start your node
-`docker-compose up -d -f gdev-mirror.docker-compose.yml` to start your node
### Reverse-proxy part (with Nginx)
### Reverse-proxy part (with Nginx)
...
@@ -66,7 +70,7 @@ To go further, read [How to become a (black)smith](./smith.md)
...
@@ -66,7 +70,7 @@ To go further, read [How to become a (black)smith](./smith.md)
## Upgrade your node with minimal interruption
## Upgrade your node with minimal interruption
1. Modify docker image tag on your compose file
1. Modify docker image tag on your compose file
2. Run `dockercompose pull`, this will pull the new image.
2. Run `docker-compose pull`, this will pull the new image.
3. Run `dockercompose up -d --remove-orphans`, this will recreate the container
3. Run `docker-compose up -d --remove-orphans`, this will recreate the container
4. Verify that your node restarted well `dockercompose logs duniter-rpc`
4. Verify that your node restarted well `docker-compose logs duniter-rpc`
5. Remove the old image `docker images rmi duniter/duniter-v2s:OLD_TAG`
5. Remove the old image `docker images rmi duniter/duniter-v2s:OLD_TAG`