Skip to content

Artifactory deployment

yml
name: af_stack
services:
  postgres:
    image: docker.io/postgres:17 # latest supported version by AF
    volumes:
      - pg_data:/var/lib/postgresql/data
    environment:
      POSTGRES_USER: artifactory
      POSTGRES_PASSWORD: postgres
      POSTGRES_DB: artifactory
    networks:
      - af-network
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
      interval: 10s
      retries: 5
      start_period: 30s
      timeout: 10s

  artifactory:
    image: docker.bintray.io/jfrog/artifactory-cpp-ce:7.117.19
    ports:
      - 8081:8081
      - 8082:8082
    restart: always
    networks:
      - af-network
    depends_on:
      postgres:
        condition: service_healthy
        restart: true
    environment:
      JF_SHARED_DATABASE_TYPE: postgresql
      JF_SHARED_DATABASE_URL: jdbc:postgresql://postgres:5432/artifactory
      JF_SHARED_DATABASE_USERNAME: artifactory
      JF_SHARED_DATABASE_PASSWORD: postgres
      JF_SHARED_DATABASE_DRIVER: org.postgresql.Driver
      JF_SHARED_SECURITY_MASTERKEY: "aba7b6d61cfb8821d2539789ccfbcda0"
      JF_SHARED_SECURITY_JOINKEY: "aba7b6d61cfb8821d2539789ccfbcda0"
    volumes:
      - af_data:/opt/jfrog/artifactory/var

networks:
  af-network:
    driver: bridge

volumes:
  af_data:
  pg_data:

Deployment

You can use this command to generate key JF_SHARED_SECURITY_MASTERKEY and JF_SHARED_SECURITY_JOINKEY.

sh
    od -A n -t x1 -N 16 /dev/urandom | tr -d ' \n'

Start

sh
    podman-compose up -d

Warning

Don’t use the latest tag, if so you will encounterd this issue unexpected HTTP status code received from > server: 404. See This stackoverflow post. You can try different tag Here.