{"id":21214400,"url":"https://github.com/oberonamsterdam/docker-pm2","last_synced_at":"2026-02-09T19:31:08.969Z","repository":{"id":83458763,"uuid":"131649335","full_name":"oberonamsterdam/docker-pm2","owner":"oberonamsterdam","description":null,"archived":false,"fork":false,"pushed_at":"2022-01-26T11:10:33.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-02-19T13:13:59.029Z","etag":null,"topics":["dockerfile"],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","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/oberonamsterdam.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":"2018-04-30T21:39:44.000Z","updated_at":"2022-01-26T11:10:36.000Z","dependencies_parsed_at":"2023-04-17T06:17:16.419Z","dependency_job_id":null,"html_url":"https://github.com/oberonamsterdam/docker-pm2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oberonamsterdam%2Fdocker-pm2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oberonamsterdam%2Fdocker-pm2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oberonamsterdam%2Fdocker-pm2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oberonamsterdam%2Fdocker-pm2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oberonamsterdam","download_url":"https://codeload.github.com/oberonamsterdam/docker-pm2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243663682,"owners_count":20327330,"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":["dockerfile"],"created_at":"2024-11-20T21:27:44.393Z","updated_at":"2026-02-09T19:31:08.937Z","avatar_url":"https://github.com/oberonamsterdam.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"Based on https://hub.docker.com/r/keymetrics/pm2/\n\n# 19-1-2020: Adding node-14 LTS support, PS5 released here but haven't been able to get one...\n# 04-05-2020: Removing node-4 support due to build errors (node-gyp-build), adding node-12 LTS\n\n# Adding git to image\n\nSince we run the source inside out PM2 containers, we need git+ssh to update inside the container.\nMount your own .ssh/id_rsa file so the container can use your own server/workstation credentials.\n\nInside the start.sh you can like, do the following things:\n* update code\n* install dependancies\n* compile code\n* start pm2 app\n\n# Example docker-compose.yml\n```\nversion: '3'\nservices:\n    node:\n        image: oberonamsterdam/pm2-git:8-alpine\n        restart: always\n        network_mode: \"bridge\"\n        volumes:\n            - .:/app/:delegated\n            - $HOME/.ssh/known_hosts:/root/.ssh/known_hosts\n            - $HOME/.ssh/id_rsa:/root/.ssh/id_rsa\n        entrypoint: [\"/app/start.sh\"]\n```\n\n# Example start.sh\n```\n#!/usr/bin/env sh\n\nwhile [ ! -f /app/deployed.lock ]\ndo\n  sleep 2\ndone\n\npm2-runtime /app/app.json\n\n```\n\n# Example deploy.sh\n```\n#!/usr/bin/env sh\n\necho \"We're deploying...\"\n\ngit pull\n\n$(which npm) install --frozen-lockfile\n$(which npm) run build\n\ntouch deployed.lock\n\npm2 reload my-app\n\necho \"\"\necho \"!!! Deploy finished !!!\"\n\n```\n\nThis example will:\n1. Start the container\n2. The start.sh will loop untill the deployed.lock file is written\n3. We execute the deploy.sh inside the container and write the deployed.lock file\n4. The start.sh will continue and start pm2-runtime\n\nOR:\n\n1. Change the entrypoint to \"pm2-runtime app/app/json\" for immediate starting of the application and not wait for the build/deployment","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foberonamsterdam%2Fdocker-pm2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foberonamsterdam%2Fdocker-pm2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foberonamsterdam%2Fdocker-pm2/lists"}