{"id":19580943,"url":"https://github.com/dokploy/docker-compose-test","last_synced_at":"2025-02-26T12:17:12.899Z","repository":{"id":242441896,"uuid":"809554055","full_name":"Dokploy/docker-compose-test","owner":"Dokploy","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-29T05:44:13.000Z","size":20,"stargazers_count":4,"open_issues_count":0,"forks_count":31,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-09T05:21:37.885Z","etag":null,"topics":[],"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/Dokploy.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-06-03T01:55:16.000Z","updated_at":"2024-12-13T17:30:07.000Z","dependencies_parsed_at":"2024-06-03T04:01:44.316Z","dependency_job_id":"853e0ae5-3dfa-4c73-b2bb-33875199ffa7","html_url":"https://github.com/Dokploy/docker-compose-test","commit_stats":null,"previous_names":["dokploy/docker-compose-test"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dokploy%2Fdocker-compose-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dokploy%2Fdocker-compose-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dokploy%2Fdocker-compose-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dokploy%2Fdocker-compose-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dokploy","download_url":"https://codeload.github.com/Dokploy/docker-compose-test/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240849012,"owners_count":19867617,"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-11-11T07:31:18.547Z","updated_at":"2025-02-26T12:17:12.587Z","avatar_url":"https://github.com/Dokploy.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# With Docker Compose\n\nThis example contains everything needed to get a Next.js development and production environment up and running with Docker Compose.\n\n## Benefits of Docker Compose\n\n- Develop locally without Node.js or TypeScript installed ✨\n- Easy to run, consistent development environment across macOS, Windows, and Linux teams\n- Run multiple Next.js apps, databases, and other microservices in a single deployment\n- Multistage builds combined with [Output Standalone](https://nextjs.org/docs/advanced-features/output-file-tracing#automatically-copying-traced-files) outputs up to 85% smaller apps (Approximately 110 MB compared to 1 GB with create-next-app)\n- Easy configuration with YAML files\n\n## How to use\n\nExecute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:\n\n```bash\nnpx create-next-app --example with-docker-compose with-docker-compose-app\n```\n\n```bash\nyarn create next-app --example with-docker-compose with-docker-compose-app\n```\n\n```bash\npnpm create next-app --example with-docker-compose with-docker-compose-app\n```\n\nOptionally, after the installation is complete:\n\n- Run `cd next-app`, then run `npm install` or `yarn install` or `pnpm install` to generate a lockfile.\n\nIt is recommended to commit a lockfile to version control. Although the example will work without one, build errors are more likely to occur when using the latest version of all dependencies. This way, we're always using a known good configuration to develop and run in production.\n\n## Prerequisites\n\nInstall [Docker Desktop](https://docs.docker.com/get-docker) for Mac, Windows, or Linux. Docker Desktop includes Docker Compose as part of the installation.\n\n## Development\n\nFirst, run the development server:\n\n```bash\n# Create a network, which allows containers to communicate\n# with each other, by using their container name as a hostname\ndocker network create my_network\n\n# Build dev\ndocker compose -f docker-compose.dev.yml build\n\n# Up dev\ndocker compose -f docker-compose.dev.yml up\n```\n\nOpen [http://localhost:3000](http://localhost:3000) with your browser to see the result.\n\nYou can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.\n\n## Production\n\nMultistage builds are highly recommended in production. Combined with the Next [Output Standalone](https://nextjs.org/docs/advanced-features/output-file-tracing#automatically-copying-traced-files) feature, only `node_modules` files required for production are copied into the final Docker image.\n\nFirst, run the production server (Final image approximately 110 MB).\n\n```bash\n# Create a network, which allows containers to communicate\n# with each other, by using their container name as a hostname\ndocker network create my_network\n\n# Build prod\ndocker compose -f docker-compose.prod.yml build\n\n# Up prod in detached mode\ndocker compose -f docker-compose.prod.yml up -d\n```\n\nAlternatively, run the production server without multistage builds (Final image approximately 1 GB).\n\n```bash\n# Create a network, which allows containers to communicate\n# with each other, by using their container name as a hostname\ndocker network create my_network\n\n# Build prod without multistage\ndocker compose -f docker-compose.prod-without-multistage.yml build\n\n# Up prod without multistage in detached mode\ndocker compose -f docker-compose.prod-without-multistage.yml up -d\n```\n\nOpen [http://localhost:3000](http://localhost:3000).\n\n## Useful commands\n\n```bash\n# Stop all running containers\ndocker kill $(docker ps -aq) \u0026\u0026 docker rm $(docker ps -aq)\n\n# Free space\ndocker system prune -af --volumes\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdokploy%2Fdocker-compose-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdokploy%2Fdocker-compose-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdokploy%2Fdocker-compose-test/lists"}