{"id":16123930,"url":"https://github.com/evenchange4/nextjs-pkg-docker-alpine","last_synced_at":"2025-10-27T12:19:12.304Z","repository":{"id":41383853,"uuid":"132996700","full_name":"evenchange4/nextjs-pkg-docker-alpine","owner":"evenchange4","description":"📥Deploy a commercial Next.js application with pkg and docker.","archived":false,"fork":false,"pushed_at":"2025-03-28T21:00:32.000Z","size":202,"stargazers_count":75,"open_issues_count":12,"forks_count":18,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T11:03:45.060Z","etag":null,"topics":["alpine","docker","multistage","nextjs","pkg","reactjs"],"latest_commit_sha":null,"homepage":"https://nextjs-pkg-docker-alpine.now.sh/","language":"JavaScript","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/evenchange4.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-05-11T06:08:43.000Z","updated_at":"2025-02-05T06:24:10.000Z","dependencies_parsed_at":"2023-12-08T04:26:08.291Z","dependency_job_id":"cdd071a0-d026-4aaf-bccf-96f5cabdd4dd","html_url":"https://github.com/evenchange4/nextjs-pkg-docker-alpine","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/evenchange4%2Fnextjs-pkg-docker-alpine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evenchange4%2Fnextjs-pkg-docker-alpine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evenchange4%2Fnextjs-pkg-docker-alpine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evenchange4%2Fnextjs-pkg-docker-alpine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evenchange4","download_url":"https://codeload.github.com/evenchange4/nextjs-pkg-docker-alpine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247648977,"owners_count":20972945,"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":["alpine","docker","multistage","nextjs","pkg","reactjs"],"created_at":"2024-10-09T21:19:11.958Z","updated_at":"2025-10-27T12:19:07.284Z","avatar_url":"https://github.com/evenchange4.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nextjs-pkg-docker-alpine\n\n\u003e Deploy a commercial Next.js application with [pkg](https://github.com/zeit/next.js/blob/canary/examples/with-pkg/README.md) and [docker](https://github.com/zeit/next.js/blob/canary/examples/with-docker/README.md).  \n\u003e Medium article: [Deploy a commercial Next.js application with pkg and docker](https://medium.com/@evenchange4/deploy-a-commercial-next-js-application-with-pkg-and-docker-5c73d4af2ee)\n\n## Demo\n\nhttps://nextjs-pkg-docker-alpine.now.sh/\n\n[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/evenchange4/nextjs-pkg-docker-alpine\u0026docker=true\u0026env=API_URL)\n\n## Install and Build\n\n```bash\n$ yarn install\n$ yarn run dev\n\n# Build pkg\n$ yarn run build\n$ yarn run pkg\n\n# Execute the binary\nNODE_ENV=production ./pkg/nextjs-pkg-docker-alpine\n```\n\n## Docker Alpine\n\n```bash\n$ docker build -t nextjs-pkg-docker-alpine .\n$ docker run --rm -it \\\n  -p 3003:3003 \\\n  -e \"PORT=3003\" \\\n  -e \"API_URL=https://API_URL.com\" \\\n  nextjs-pkg-docker-alpine\n```\n\n\u003e Note: It might take some time to `fetch base Node.js binaries to PKG_CACHE_PATH` during the pkg process.\n\n## Deploy to Now\n\n```bash\n$ now --docker\n```\n\n# License\n\nMIT © [Michael Hsu](https://michaelhsu.tw)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevenchange4%2Fnextjs-pkg-docker-alpine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevenchange4%2Fnextjs-pkg-docker-alpine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevenchange4%2Fnextjs-pkg-docker-alpine/lists"}