### Perform initial deployment and user setup Source: https://packistry.github.io/docs/guides/kamal Commands to execute the initial setup and create an admin user inside the container. ```bash kamal setup ``` ```bash kamal app exec -i sh ``` ```bash packistry add:user ``` -------------------------------- ### Example command output Source: https://packistry.github.io/docs/commands/delete-source Displays the confirmation messages received after successfully deleting sources. ```text Source SourceOne deleted Source SourceTwo deleted ``` -------------------------------- ### Example output for added packages Source: https://packistry.github.io/docs/commands/add-package The system displays confirmation messages upon successful addition of packages. ```text Package One added Package Two added ``` -------------------------------- ### Example command output Source: https://packistry.github.io/docs/commands/delete-user Displays the confirmation messages shown after successfully deleting users. ```text User John Doe deleted User Jane Smith deleted ``` -------------------------------- ### Deploy Token Output Example Source: https://packistry.github.io/docs/commands/add-deploy-token The command returns a success message and the generated token. Save this value immediately as it is not retrievable later. ```text Deploy token created pkdt-0v8xHbiWeuVGwc14k9XRf3xCxISJqjksF7TnPmFcac22317e ``` -------------------------------- ### Start Packistry container Source: https://packistry.github.io/docs/installation Starts the defined services in detached mode. ```bash docker compose up -d ``` -------------------------------- ### Example success output Source: https://packistry.github.io/docs/commands/add-source The message displayed in the terminal upon successful creation of a new package source. ```text Source created ``` -------------------------------- ### Example deletion output Source: https://packistry.github.io/docs/commands/delete-package This output appears in the console after successfully confirming and deleting the selected packages. ```text Package [repository] PackageOne deleted Package [repository] PackageTwo deleted ``` -------------------------------- ### Delete Repository Output Source: https://packistry.github.io/docs/commands/delete-repository Example output displayed after successfully deleting repositories. ```text Repository RepositoryOne deleted Repository RepositoryTwo deleted ``` -------------------------------- ### Example command output Source: https://packistry.github.io/docs/commands/delete-deploy-token This output appears in the terminal after successfully confirming and deleting the selected tokens. ```text Deploy token TokenOne deleted Deploy token TokenTwo deleted ``` -------------------------------- ### Install a Package via Composer Source: https://packistry.github.io/docs/installation Use this command to install a specific package from your Packistry repository by replacing the placeholder with the desired vendor and package name. ```bash composer require vendor/name ``` -------------------------------- ### Run Packistry with Docker Source: https://packistry.github.io/docs/installation Alternative command to start the Packistry container directly without using Docker Compose. ```bash docker run -p 80:80 -e APP_KEY=[app_key] -v /host/data/path:/data ghcr.io/packistry/packistry:latest ``` -------------------------------- ### Configure Kamal for Packistry Reverse Proxy Source: https://packistry.github.io/docs/guides/behind-a-reverse-proxy Use this configuration in your Kamal setup to define the application URL and trust the reverse proxy. ```yaml ... proxy: host: [DOMAIN NAME] ssl: true env: clear: APP_URL: https://[DOMAIN NAME] TRUSTED_PROXIES: * secret: - APP_KEY ... ``` -------------------------------- ### Run add:repository command Source: https://packistry.github.io/docs/commands/add-repository Execute this command in your terminal to initiate the repository creation process. ```bash packistry add:repository ``` -------------------------------- ### Run the add:source command Source: https://packistry.github.io/docs/commands/add-source Execute this command in your terminal to initiate the interactive source creation process. ```bash packistry add:source ``` -------------------------------- ### Initialize and configure secrets Source: https://packistry.github.io/docs/guides/kamal Commands to copy the secrets template and generate a secure application key. ```bash cp .kamal/secrets.example .kamal/secrets ``` ```bash # Token for the GitHub Container Registry. Create one at https://github.com/settings/tokens/new with the "write:packages" scope. KAMAL_REGISTRY_PASSWORD=your-registry-password APP_KEY=your-app-key ``` ```bash echo "base64:$(openssl rand -base64 32)" ``` -------------------------------- ### Run Add Deploy Token Command Source: https://packistry.github.io/docs/commands/add-deploy-token Execute this command in your terminal to initiate the token creation process. ```bash packistry add:deploy-token ``` -------------------------------- ### Run the add:package command Source: https://packistry.github.io/docs/commands/add-package Execute this command in your terminal to initiate the package addition process. ```bash packistry add:package ``` -------------------------------- ### Run the rebuild:package command Source: https://packistry.github.io/docs/commands/rebuild-package Execute the command to initiate the package rebuild process. ```bash packistry rebuild:package ``` -------------------------------- ### Run Add User Command Source: https://packistry.github.io/docs/commands/add-user Execute this command in the terminal to initiate the interactive user creation process. ```bash packistry add:user ``` -------------------------------- ### Update and deploy application Source: https://packistry.github.io/docs/guides/kamal Steps to update the Dockerfile version and trigger a new deployment. ```diff - FROM ghcr.io/packistry/packistry:0.7.2 + FROM ghcr.io/packistry/packistry:0.8.0 ``` ```bash kamal deploy ``` -------------------------------- ### Generate APP_KEY environment variable Source: https://packistry.github.io/docs/installation Creates an .env file with a secure base64-encoded application key. ```bash echo "APP_KEY=base64:$(openssl rand -base64 32)" >> .env ``` -------------------------------- ### Create admin user Source: https://packistry.github.io/docs/installation Executes the user creation command inside the running container. ```bash docker compose exec packistry packistry add:user ``` -------------------------------- ### Run Delete Repository Command Source: https://packistry.github.io/docs/commands/delete-repository Execute the command to initiate the repository deletion process. ```bash packistry delete:repository ``` -------------------------------- ### Define .env Configuration Source: https://packistry.github.io/docs/guides/store-archives-s3 Environment variables required for MySQL and S3 storage connectivity. Ensure DB_PASSWORD and AWS_SECRET_ACCESS_KEY are populated. ```text APP_KEY= # MySQL Configuration DB_DATABASE=packistry DB_USERNAME=packistry DB_PASSWORD= # S3 Configuration FILESYSTEM_DISK=s3 AWS_ACCESS_KEY_ID=packistry AWS_SECRET_ACCESS_KEY= AWS_DEFAULT_REGION=us-east-1 AWS_BUCKET=archives AWS_ENDPOINT=http://minio:9000 AWS_USE_PATH_STYLE_ENDPOINT=true AWS_URL=http://localhost:9000/archives ``` -------------------------------- ### Configure .env variables Source: https://packistry.github.io/docs/guides/mysql Required environment variables for connecting Packistry to a MySQL database. ```text APP_KEY= DB_DATABASE=packistry DB_USERNAME=packistry DB_PASSWORD= ``` -------------------------------- ### Run delete:source command Source: https://packistry.github.io/docs/commands/delete-source Execute the command to initiate the source deletion process. ```bash packistry delete:source ``` -------------------------------- ### Repository creation success message Source: https://packistry.github.io/docs/commands/add-repository The confirmation output displayed after successfully creating a new repository. ```text Repository created ``` -------------------------------- ### Configure Composer repository Source: https://packistry.github.io/docs/installation Registers the Packistry server as a composer repository. Use the second command for non-root repository paths. ```bash composer config repositories.packistry composer [url] ``` ```bash composer config repositories.packistry composer [url]/r/[path] ``` -------------------------------- ### Authenticate with repository tokens Source: https://packistry.github.io/docs/installation Configures bearer tokens for private repository access. Use the global flag for local machine authentication. ```bash composer config bearer.[hostname] "pkdt-9m5HWKPaTg08fArR66zRAbthl7kEYBSIoxByltwibeb01ebf" ``` ```bash composer config --global bearer.[hostname] "pkpat-9m5HWKPaTg08fArR66zRAbthl7kEYBSIoxByltwibeb01ebf" ``` -------------------------------- ### Configure Kamal deployment settings Source: https://packistry.github.io/docs/guides/kamal Modify the config/deploy.yml file to define service, registry, server, and environment variables. ```yaml service: packistry image: [IMAGE NAME] # e.g., username/image-name registry: server: ghcr.io/[IMAGE NAME] username: [USERNAME] # e.g., myusername password: - KAMAL_REGISTRY_PASSWORD # value is set in secrets servers: - [SERVER IP] # e.g., 188.222.55.129 volumes: - ./data:/data proxy: host: [DOMAIN NAME] # e.g., packistry.com ssl: true # Create an A record for the domain name pointing to your server's IP, and Kamal will obtain a free TLS certificate via Let's Encrypt. env: clear: TRUSTED_PROXIES: * # accepts *, one or multiple IPs comma-separated. secret: - APP_KEY # value is set in secrets builder: arch: arm64 # Specify your server's architecture, e.g., amd64 or arm64 ``` -------------------------------- ### User Creation Confirmation Source: https://packistry.github.io/docs/commands/add-user The output displayed in the terminal upon successful creation of a new user. ```text User created ``` -------------------------------- ### Run delete:user command Source: https://packistry.github.io/docs/commands/delete-user Execute the command to initiate the user deletion process. ```bash packistry delete:user ``` -------------------------------- ### Run Reset Password Command Source: https://packistry.github.io/docs/commands/reset-password Execute this command in the terminal to initiate the password reset process. ```bash packistry reset:password ``` -------------------------------- ### Package selection format Source: https://packistry.github.io/docs/commands/rebuild-package The format used to display packages during the interactive selection process. ```text > ``` -------------------------------- ### Run delete:package command Source: https://packistry.github.io/docs/commands/delete-package Execute this command in your terminal to initiate the package deletion process. ```bash packistry delete:package ``` -------------------------------- ### Run delete:deploy-token command Source: https://packistry.github.io/docs/commands/delete-deploy-token Execute this command in your terminal to initiate the interactive token deletion process. ```bash packistry delete:deploy-token ``` -------------------------------- ### Rebuild scope confirmation Source: https://packistry.github.io/docs/commands/rebuild-package The prompt displayed to determine if the rebuild should apply to all packages or a subset. ```text Rebuild all packages? (yes/no) ``` -------------------------------- ### Define Docker Compose Services Source: https://packistry.github.io/docs/guides/store-archives-s3 Docker Compose configuration for Packistry, MinIO, and MySQL services. ```yaml services: packistry: image: ghcr.io/packistry/packistry:latest restart: unless-stopped environment: - APP_KEY=${APP_KEY} # MySQL Configuration - DB_CONNECTION=${DB_CONNECTION:-mysql} - DB_DATABASE=${DB_DATABASE} - DB_USERNAME=${DB_USERNAME} - DB_PASSWORD=${DB_PASSWORD} - DB_HOST=${DB_CONNECTION:-database} # S3 Configuration - FILESYSTEM_DISK=${FILESYSTEM_DISK} - AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} - AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} - AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION} - AWS_BUCKET=${AWS_BUCKET} - AWS_ENDPOINT=${AWS_ENDPOINT} - AWS_USE_PATH_STYLE_ENDPOINT=${AWS_USE_PATH_STYLE_ENDPOINT} - AWS_URL=${AWS_URL} ports: - "80:80" volumes: - packistry-storage:/data depends_on: database: condition: service_healthy minio: condition: service_healthy minio: image: minio/minio:latest restart: unless-stopped ports: - "${FORWARD_MINIO_PORT:-9000}:9000" - "${FORWARD_MINIO_CONSOLE_PORT:-8900}:8900" environment: MINIO_ROOT_USER: ${AWS_ACCESS_KEY_ID} MINIO_ROOT_PASSWORD: ${AWS_SECRET_ACCESS_KEY} volumes: - minio-data:/data/minio command: minio server /data/minio --console-address ":8900" healthcheck: test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] retries: 3 timeout: 5s database: image: mysql/mysql-server:8.0 restart: unless-stopped ports: - "${FORWARD_DB_PORT:-3306}:3306" environment: MYSQL_ROOT_PASSWORD: ${DB_PASSWORD} MYSQL_ROOT_HOST: '%' MYSQL_DATABASE: ${DB_DATABASE} MYSQL_USER: ${DB_USERNAME} MYSQL_PASSWORD: ${DB_PASSWORD} volumes: - mysql-data:/var/lib/mysql healthcheck: test: ["CMD", "mysqladmin", "ping", "-p${DB_PASSWORD}"] retries: 3 timeout: 5s volumes: packistry-storage: mysql-data: driver: local minio-data: driver: local ``` -------------------------------- ### Run archives:clean with dry run Source: https://packistry.github.io/docs/commands/archives-clean Previews the files that would be removed without performing any actual deletions. ```bash packistry archives:clean --dry-run ``` -------------------------------- ### Copy data from container Source: https://packistry.github.io/docs/installation Extracts storage data from the container to the host machine for backup purposes. ```bash docker cp CONTAINER_ID:/data ./path/on/host ``` -------------------------------- ### Define Docker Compose configuration Source: https://packistry.github.io/docs/installation Standard compose.yaml configuration for running the Packistry service with persistent storage. ```yaml services: packistry: image: ghcr.io/packistry/packistry:latest restart: unless-stopped environment: - APP_KEY=${APP_KEY} ports: - 80:80 volumes: - packistry-storage:/data volumes: packistry-storage: ``` -------------------------------- ### Configure Composer for Insecure HTTP Source: https://packistry.github.io/docs/installation Use this command to disable secure-http in Composer for local development environments where HTTPS is not available. ```bash composer config secure-http false ``` -------------------------------- ### Run archives:clean command Source: https://packistry.github.io/docs/commands/archives-clean Executes the command to remove unreferenced archive files from the repository. ```bash packistry archives:clean ``` -------------------------------- ### Password Reset Success Output Source: https://packistry.github.io/docs/commands/reset-password The confirmation message displayed upon successful completion of the password update. ```text Password reset successful! ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.