Posted in

Setting up your own Project Quay

[Draft for my own notes later]

docker network create lab_nw --driver=bridge   --subnet=172.18.0.0/23 --ip-range=172.18.0.0/23 --gateway=172.18.0.1
docker run --rm -it -p 8080:8080 --network lab_nw --name quay-config quay.io/projectquay/quay:3.15.2 config secret/
services:

  # this is important as it helps us to front
  nginx-pm:
    container_name: nginx-pm
    image: "jlesage/nginx-proxy-manager:latest"
    restart: unless-stopped
    ports:
      - '443:4443'
      - '81:8181'
      - '82:8080'
    volumes:
      - "/docker/nginx-pm:/config:rw"
    environment:
      - "USER_ID=1000" #replace this with your uid
      - "GROUP_ID=998" #replace this with docker gid
      - "TZ=Asia/Singapore"
      - "DISABLE_IPV6=1"
    networks:
      lab_nw:

  quay:
    container_name: quay
    image: quay.io/projectquay/quay:3.15.2
    ports:
      - "8080:8080" # UI and API
      #- "8443:8443" # UI and API (HTTPS)
    volumes:
      - ./quay/config:/conf/stack:Z
      - ./quay/storage:/datastorage:Z
    depends_on:
      - quay-redis
      - quay-db
    environment:
      - DEBUGLOG=true
    networks:
      lab_nw:
    healthcheck:
      test: ["CMD-SHELL", "curl -fsS http://localhost:8080/health/instance || exit 1"]
      interval: 15s
      timeout: 5s
      retries: 20

  quay-redis:
    image: redis:latest
    container_name: quay-redis
    volumes:
      - ./redis/data:/data:Z
    networks:
      lab_nw:
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 10s
      timeout: 5s
      retries: 10

  quay-db:
    image: postgres:14
    container_name: quay-db
    volumes:
      - ./db/data:/var/lib/postgresql/data:Z
      - ./db/init:/docker-entrypoint-initdb.d:Z
    environment:
      - POSTGRES_USER=quay
      - POSTGRES_PASSWORD=quay_password
      - POSTGRES_DB=quay
    networks:
      lab_nw:
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U quay -d quay"]
      interval: 10s
      timeout: 5s
      retries: 10

networks:
  lab_nw:
    external: true

Setup your own SUPER_USER for Quay after creating the account,

# Add this block to your config.yaml
SUPER_USERS:
  - john
  - another_admin_username # You can add more than one

Leave a Reply

Your email address will not be published. Required fields are marked *