{"id":13542565,"url":"https://github.com/antoniomika/pcompose","last_synced_at":"2025-10-27T05:52:48.634Z","repository":{"id":45677533,"uuid":"271704370","full_name":"antoniomika/pcompose","owner":"antoniomika","description":"An open source PaaS using docker-compose","archived":false,"fork":false,"pushed_at":"2025-03-31T22:04:07.000Z","size":130,"stargazers_count":59,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-31T23:21:59.223Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antoniomika.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"antoniomika"}},"created_at":"2020-06-12T04:00:12.000Z","updated_at":"2025-03-19T10:19:42.000Z","dependencies_parsed_at":"2022-09-10T08:11:39.608Z","dependency_job_id":null,"html_url":"https://github.com/antoniomika/pcompose","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoniomika%2Fpcompose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoniomika%2Fpcompose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoniomika%2Fpcompose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoniomika%2Fpcompose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antoniomika","download_url":"https://codeload.github.com/antoniomika/pcompose/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246796862,"owners_count":20835460,"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":"2024-08-01T10:01:10.881Z","updated_at":"2025-10-27T05:52:43.601Z","avatar_url":"https://github.com/antoniomika.png","language":"Go","funding_links":["https://github.com/sponsors/antoniomika"],"categories":["Go","others"],"sub_categories":[],"readme":"# pcompose\n\nAn open source PaaS using docker-compose.\n\n## Deploy\n\nBuilds are made automatically on Dockerhub. Feel free to either use the automated binaries or to build your own.\n\n1. Clone this repo\n    - `git clone https://github.com/antoniomika/pcompose`\n2. Use docker-compose to stand up pcompose and nginx-proxy with Let's Encrypt\n    - `docker-compose -p pcompose -f deploy/docker-compose.yml up -d`\n\nAnd you're ready to start using it!\n\n## How it works\n\npcompose is ultimately a wrapper around the docker-compose and docker CLIs. I could've integrated it directly with the APIs, but there were quite a few hacks that were needed to make that happen. Also, this made it extremely easy to continue to work with the familiar and easy to use CLIs\n\npcompose implements an SSH server, which you can add authentication to, to allow you to push a git repo which is then used to stand up a docker-compose project. pcompose then offers some convenience features as well easy access to these deployed services, all from within a docker-compose.yml file.\n\nHere's an example `docker-compose.yml` file that works with pcompose:\n\n```yml\nversion: '3.7'\nservices:\n  whoami:\n    image: kennethreitz/httpbin\n    environment:\n      - VIRTUAL_HOST=http.example.com\n      - LETSENCRYPT_HOST=http.example.com\n      - LETSENCRYPT_EMAIL=certs@example.com\n```\n\nThis configuration will deploy [httpbin](https://httpbin.org) to be accessible from the address `https://http.example.com` and will automatically setup Let's Encrypt and the nginx-proxy to the resource. All you need to do is:\n\n1. Place that file into a directory\n    - `mkdir httpbin \u0026\u0026 touch httpbin/docker-compose.yml`\n2. Initialize a git repo\n    - `cd httpbin \u0026\u0026 git init`\n3. Add and commit the file to the new repo\n    - `git add . \u0026\u0026 git commit -m \"Init\"`\n4. Add a remote that points to pcompose\n    - `git remote add origin pcompose ssh://example.com:2222/user/httpbin`\n5. Push to the pcompose remote\n    - `git push pcompose main`\n\nAfter step 5, you should see some output that looks like this:\n\n```text\nEnumerating objects: 5, done.\nCounting objects: 100% (5/5), done.\nDelta compression using up to 12 threads\nCompressing objects: 100% (2/2), done.\nWriting objects: 100% (3/3), 668 bytes | 668.00 KiB/s, done.\nTotal 3 (delta 1), reused 0 (delta 0)\nremote: Creating user_httpbin_whoami_1 ... done\nremote:\nTo ssh://example.com:2222/user/httpbin\n   95fae00..a34685d  main -\u003e main\n```\n\nOnce that's done, you should be ready to access your service at `https://http.example.com`\n\n## Features\n\nThere are a few useful features that are implemented into pcompose.\n\n### Integrated Shell\n\nThe first is a linux shell with access to docker-compose and docker CLIs which is scoped to each project:\n\n```bash\nssh -p 2222 user/httpbin@example.com\n```\n\nWill drop you right into a shell where you can run docker-compose or docker in the remote context.\n\n### Remote docker-compose\n\nYou can also use docker-compose through pcompose in the project context easily:\n\n```bash\nssh -p 2222 user/httpbin@example.com ps -a\n```\n\nor\n\n```bash\nssh -p 2222 user/httpbin@example.com down\n```\n\n### Exec into containers\n\nNext, you can exec directly into a container through pcompose (granted, the container needs to have `/bin/sh`):\n\n```bash\nssh -p 2222 user_httpbin_whoami_1@example.com\n```\n\nor\n\n```bash\nssh -p 2222 c-user_httpbin_whoami_1@example.com\n```\n\n### Container logs\n\nYou can grab and follow container logs through pcompose:\n\n```bash\nssh -p 2222 l-user_httpbin_whoami_1@example.com\n```\n\n### Attach to container\n\nYou can attach directly to a container through pcompose:\n\n```bash\nssh -p 2222 a-user_httpbin_whoami_1@example.com\n```\n\n## Caveats\n\n### nginx-proxy\n\n[nginx-proxy](https://github.com/nginx-proxy/nginx-proxy) is a pretty great tool to handle dynamic host configuration. This can easily be swapped for [traefik](https://containo.us/traefik/) or some other reverse proxy that supports configuration using docker.\n\nThe way this currently works is pcompose will create the default network for docker-compose and will attach `nginx-proxy` to the created network. This means you must use the default network or at least pre-create the network and attach `nginx-proxy` to it in order to use it for HTTP(S) reverse proxying\n\n### Persistence\n\n`docker-compose` allows the use of relative directories for defining data volumes in applications. I recommend using relative directories from your application to make it easy for you to find your data when you need to.\n\nI also recommend to bind mount the `--data-directory` to be the same in both the host and the pcompose container. If your application uses a relative mount and the data directory is not the same, your persistence data could end up in a different location than intended!\n\n## CLI Flags\n\n```text\npcompose is a command line utility that runs a simple PaaS ontop of docker using docker-compose and git\n\nUsage:\n  pcompose [flags]\n\nFlags:\n      --authentication                         Require authentication for the SSH service\n  -k, --authentication-keys-directory string   Directory where public keys for public key authentication are stored.\n                                               pcompose will watch this directory and automatically load new keys and remove keys\n                                               from the authentication list (default \"deploy/pubkeys/\")\n  -u, --authentication-password string         Password to use for ssh server password authentication (default \"S3Cr3tP4$$W0rD\")\n  -o, --banned-countries string                A comma separated list of banned countries. Applies to SSH connections\n  -x, --banned-ips string                      A comma separated list of banned ips that are unable to access the service. Applies to SSH connections\n      --cleanup-unbound                        Cleanup unbound (unforwarded) SSH connections after a set timeout (default true)\n  -c, --config string                          Config file (default \"config.yml\")\n      --data-directory string                  Directory that holds pcompose data (default \"deploy/data/\")\n      --debug                                  Enable debugging information\n      --frontend-container-name string         The name of the frontend container in order to connect it to the default docker-compose network. (default \"nginx-proxy\")\n      --geodb                                  Use a geodb to verify country IP address association for IP filtering\n  -h, --help                                   help for pcompose\n      --log-to-file                            Enable writing log output to file, specified by log-to-file-path\n      --log-to-file-compress                   Enable compressing log output files\n      --log-to-file-max-age int                The maxium number of days to store log output in a file (default 28)\n      --log-to-file-max-backups int            The maxium number of rotated logs files to keep (default 3)\n      --log-to-file-max-size int               The maximum size of outputed log files in megabytes (default 500)\n      --log-to-file-path string                The file to write log output to (default \"/tmp/pcompose.log\")\n      --log-to-stdout                          Enable writing log output to stdout (default true)\n      --pcompose-container-name string         The name of the pcompose container in order to exec into a context. (default \"pcompose\")\n  -l, --private-key-location string            The location of the SSH server private key. pcompose will create a private key here if\n                                               it doesn't exist using the --private-key-passphrase to encrypt it if supplied (default \"deploy/keys/ssh_key\")\n  -p, --private-key-passphrase string          Passphrase to use to encrypt the server private key (default \"S3Cr3tP4$$phrAsE\")\n  -a, --ssh-address string                     The address to listen for SSH connections (default \"localhost:2222\")\n      --time-format string                     The time format to use for general log messages (default \"2006/01/02 - 15:04:05\")\n  -v, --version                                version for pcompose\n  -y, --whitelisted-countries string           A comma separated list of whitelisted countries. Applies to SSH connections\n  -w, --whitelisted-ips string                 A comma separated list of whitelisted ips. Applies to SSH connections\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoniomika%2Fpcompose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantoniomika%2Fpcompose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoniomika%2Fpcompose/lists"}