Deploying on Docker
Yay Or Nay has been designed with Docker as primary deployment target.
Images for deployment are available for all tags/releases as well as the current HEAD
of the main
branch as latest
image.
Prerequisites
Clone the repository or download the compose.yaml
file from the repository.
git clone https://github.com/mocdaniel/yay-or-nay
cd yay-or-nay
In addition, you will need Docker and its compose
plugin, which these days
should come with the Docker installation.
Configuring Yay Or Nay
Once you have a local copy of compose.yaml
, change the lines as indicated by clicking the (1) icons:
- Like this.
services:
yay-or-nay:
container_name: yay-or-nay
depends_on:
- postgres
environment:
POSTGRES_URL: postgres://postgres:postgres@postgres:5432/yay_or_nay # (3)!
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:3000 || exit 1"]
interval: 10s
timeout: 5s
retries: 5
image: yay-or-nay:latest
ports:
- "3000:3000"
restart: unless-stopped
postgres:
container_name: yay-or-nay-postgres
environment:
POSTGRES_PASSWORD: "postgres" # (1)!
POSTGRES_USER: "postgres" # (2)!
POSTGRES_DB: "yay_or_nay"
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 10s
timeout: 5s
retries: 5
image: postgres:16
restart: unless-stopped
volumes:
- yay-or-nay-data:/var/lib/postgresql/data
volumes:
yay-or-nay-data: {}
- Set a custom password
- Set a custom user (optional)
- Update the
POSTGRES_URL
string to contain the set username and password
Deploying Yay Or Nay
Once you adjusted compose.yaml
to your liking, deploy the stack with Docker like this:
docker compose up -d
You can check whether the deployment was successful using
docker compose ps
Logging In to Yay Or Nay for the First Time
Yay Or Nay allows only one user to be registered. After deploying the application, navigate to localhost:3000/signup in your browser, and set a username and password.