Deployment

This tutorial walks you through a quick setup of Authority, a PostgreSQL instance, and a simple User Login & Consent App based on Docker Compose. You need to have the latest Docker and Docker Compose version installed.

Dockerfile

Authority project contains a simple Dockerfile that compiles and builds a simple docker image with little to no dependencies.

FROM crystallang/crystal:latest-alpine as source
WORKDIR /opt/app
COPY . /opt/app
RUN shards install
RUN crystal build --release --static ./src/server.cr -o ./server
CMD ["crystal", "spec"]

FROM alpine:latest  
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=source /opt/app/server .
COPY --from=source /opt/app/public ./public
CMD ["./server"]

Docker-Compose

To start using Authority run the following command

To change the Authority server configuration change the local.env file

Last updated

Was this helpful?