Self Host Nile Auth
Learn how to self-host Nile Auth in your own infrastructure
Prerequisites
Ensure you have the following installed:
- Docker
- Docker Compose (if needed)
Building the Docker Image
To build the nile-auth-server
Docker image, navigate to the project root where the Dockerfile
is located and run:
Running the Container
Run the container with environment variables and port mapping:
Running with Docker Compose
If using Docker Compose, there is a compose.yml
in the repo that needs to be modified to include database connection information.
API routes inside the container differ from the Nile-hosted version. Because the credentials are specific to a given database, the database name needs to be used as the path to make requests.
For example, in the hosted version, the URLs are accessed via https://localhost:3001/v2/databases/<uuid>
. For a stand-alone setup, it would be https://localhost:3001/v2/databases/<database_name>
.
Run the container with:
Stopping and Removing Containers
To stop the running container:
To remove the container:
Logs and Debugging
View logs:
Access the running container:
Was this page helpful?