Prerequisites

Deployment Steps

  1. Create a docker-compose.yml file with the following content:
services:
  app:
    image: identety/identety:latest
    ports:
      - "3000:3000"
    environment:
      - DATABASE_URL=postgresql://postgres:password@db:5432/identety
      - API_KEY=your-secure-api-key
    depends_on:
      - db

  db:
    image: postgres:15
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=password
      - POSTGRES_DB=identety
    volumes:
      - postgres_data:/var/lib/postgresql/data
    ports:
      - "5432:5432"

volumes:
  postgres_data:
  1. Replace your-secure-api-key with a strong API key. This key will be used to secure your Identety deployment.

  2. Start the services using Docker Compose:

docker-compose up -d

This command will download the necessary Docker images and start Identety and its PostgreSQL database in the background.

  1. Access the Identety API at http://localhost:3000. You can now start making API requests to the Identety endpoints.

Manual Docker Setup

If you prefer to run Identety using Docker without Docker Compose, you can use the following command:

docker run \
  --name identety \
  -p 3000:3000 \
  -e DATABASE_URL=<your-database-url> \
  -e API_KEY=your-secure-api-key \
  identety/identety:latest

Replace <your-database-url> with the URL of your PostgreSQL database. For example:

postgresql://user:password@host:5432/identety

If you want to pass locallly installed postgresql url to docker contaier, use host.docker.internal: as host name.

For example: postgresql://user:password@localhost:5432/identety will be changed to postgresql://user:password@host.docker.internal:5432/identety

Ensure that you have a running PostgreSQL database accessible at the provided URL.

Next Steps

With Identety up and running, you can now:

  • Configure your authentication providers
  • Register client applications
  • Define roles and permissions
  • Integrate Identety into your applications

Refer to the API documentation for detailed information on using the Identety endpoints.