{"id":25063159,"url":"https://github.com/packistry/kamal","last_synced_at":"2025-08-24T19:39:50.434Z","repository":{"id":259974962,"uuid":"868498708","full_name":"packistry/kamal","owner":"packistry","description":"Deploy Packistry with Kamal","archived":false,"fork":false,"pushed_at":"2025-02-13T21:33:17.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T22:32:48.168Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/packistry.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-06T14:40:20.000Z","updated_at":"2025-02-13T21:33:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"6e7f9f5b-fc96-45ad-9fd8-597eae646764","html_url":"https://github.com/packistry/kamal","commit_stats":null,"previous_names":["packistry/kamal"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/packistry%2Fkamal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/packistry%2Fkamal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/packistry%2Fkamal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/packistry%2Fkamal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/packistry","download_url":"https://codeload.github.com/packistry/kamal/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246466225,"owners_count":20782110,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-06T17:57:56.840Z","updated_at":"2025-03-31T12:23:42.858Z","avatar_url":"https://github.com/packistry.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Packistry Deployment with Kamal\n\nThis repository provides a streamlined setup for deploying Packistry using [Kamal](https://kamal-deploy.org/docs/). This guide walks you through configuring, deploying, and managing Packistry with ease.\n\n## Prerequisites\n\nBefore getting started, make sure the following are installed, configured, and ready for use:\n\n- **Kamal**: A deployment tool that should be installed on your local machine.\n- **Server Access**: You must have root access to the server and an SSH key properly set up.\n- **DNS Configuration**: An A record must be configured for your domain, pointing to the server's IP address.\n- **Container Registry Credentials**: Ensure you have valid credentials for authentication with your container registry.\n\n## Setup Instructions\n\n### 1. Customize Deployment Configuration\n\nThe deployment process is driven by the `config/deploy.yml` file. Modify this file to match your environment, such as server address and environment variables.\n\n**Replace all values enclosed in [] with your specific values**. For example, replace [IMAGE NAME] with your actual image name, and [DOMAIN NAME] with your domain name.\n\n```yaml\nservice: packistry\nimage: [IMAGE NAME] # e.g., username/image-name\n\nregistry:\n  server: ghcr.io/[IMAGE NAME]\n  username: [USERNAME] # e.g., myusername\n  password:\n    - KAMAL_REGISTRY_PASSWORD # value is set in secrets\n\nservers:\n  - [DOMAIN NAME] # e.g., 188.245.98.129 or packistryphp.com\n\nvolumes:\n  - ./data/database.sqlite:/var/www/html/database/database.sqlite\n  - ./data/archives:/var/www/html/storage/app/private\n\nproxy:\n  host: [DOMAIN NAME] # e.g., packistryphp.com\n  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.\n  forward_headers: true\n\nenv:\n  clear:\n    APP_URL: https://[DOMAIN NAME] # e.g., https://packistry.j4mie.com\n    TRUSTED_PROXIES: 172.18.0.2 # kamal-proxy ip\n  secret:\n    - APP_KEY # value is set in secrets\n\nbuilder:\n  arch: arm64 # Specify your server's architecture, e.g., amd64 or arm64\n```\n\n### 2. Configure Secrets\n\nCopy the example secrets file and populate it with the necessary values:\n\n```bash\ncp .kamal/secrets.example .kamal/secrets\n```\n\nAfter copying, open the `.kamal/secrets` file and fill in the required values:\n\n```plaintext\n# Token for the GitHub Container Registry. Create one at https://github.com/settings/tokens/new with the \"write:packages\" scope.\nKAMAL_REGISTRY_PASSWORD=your-registry-password\nAPP_KEY=your-app-key\n```\n\nTo generate a secure `APP_KEY`, run:\n\n```bash\necho \"base64:$(openssl rand -base64 32)\"\n```\n\n### 3. Initial Deployment Setup\n\nFor the first deployment, Kamal will SSH into your server, install Docker, build your container image, and deploy the application.\n\nRun the following command to begin the setup:\n\n```bash\nkamal setup\n```\n\nOnce the setup is complete, create an admin user by accessing the shell within the container:\n\n```bash\nkamal app exec -i sh\n```\n\nInside the container, run:\n\n```bash\npackistry add:user\n```\n\n### 4. Updates and Subsequent Deployments\n\nTo deploy updates or new versions of the Packistry, follow these steps:\n\n**Update the Dockerfile**: In the root of your project, modify the `Dockerfile` to use the latest version of the Packistry image. For example, update the version number as follows:\n\n```diff\n- FROM ghcr.io/packistry/packistry:0.2.1\n+ FROM ghcr.io/packistry/packistry:0.3.0\n```\n\n**Run the Deployment**: After updating the `Dockerfile`, deploy the updated version by running:\n\n```bash\nkamal deploy\n```\n\nKamal will pull the updated container image and deploy it to your server, ensuring that the latest version is running.\n\n## Managing Volumes\n\nApplication data is persisted in the `/root/data` directory on the server. This ensures that your data remains intact between deployments and container restarts.\n\n## Additional Customization\n\nFeel free to adjust deployment scripts and configurations to suit your specific needs. For advanced customization options, refer to the official [Kamal Documentation](https://kamal-deploy.org/docs/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpackistry%2Fkamal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpackistry%2Fkamal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpackistry%2Fkamal/lists"}