Production
This page explains how to run the app in production environment
Requirements
In order to properly run the application, you need at least the following installed:
- Git
- Docker
Installation
Start of by downloading or cloning the pdns-docker repository
git clone https://github.com/passivedns/pdns-docker.git
git clone git@github.com:passivedns/pdns-docker.git
gh repo clone passivedns/pdns-docker
Setup the database password
Before running the application, you need to change the database root password. This can be done in the pdns-docker/prod/docker-compose.yml
file:
|
|
Run the application
cd pdns-docker/prod
docker compose up
This should start all of the containers.
If you are on MacOS and encounter any problem with the volumes while running the containers:
The volume management with Docker and MacOS is a little bit tricky, so here is a simple fix:
Update the file pdns-docker/prod/docker-compose.yml
, by replacing the volume path with ./
instead of /
.
In arango:
|
|
And in Redis:
|
|
Create an admin user
By default, the database is not initialized. You need to create an admin user in order to initialize it and be able to use the application.
Either by Docker Desktop or by CLI, in a shell of the API container :
Exec
tab.Open a shell inside the api container:
docker exec -it api sh
This should open a new window shell.
Then, create a new admin user with:
../docker-entrypoint.sh create-user [USERNAME] [PASSWORD] --admin
Replacing [USERNAME]
and [PASSWORD]
with the corresponding data.
Setup the scheduler
Once the application is up and running, you can log in with the admin credentials, and you can setup a scheduler in the Users
section. Once that is done, you need to update the .env
file that is located in the /pdns-docker/prod/
:
|
|
Replacing [USERNAME]
and [PASSWORD]
with the corresponding data.
You then have to restart the scheduler container, and everything is ready!