{"id":16113000,"url":"https://github.com/guilospanck/node-and-nginx-with-docker-compose","last_synced_at":"2026-04-11T05:37:36.022Z","repository":{"id":103567120,"uuid":"392117874","full_name":"Guilospanck/node-and-nginx-with-docker-compose","owner":"Guilospanck","description":"This repository will serve as a guideline if you want to have a server running NGINX and Node.js with Docker.","archived":false,"fork":false,"pushed_at":"2021-08-02T22:59:57.000Z","size":139,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-12T12:55:46.261Z","etag":null,"topics":["docker","docker-compose","nginx","nodejs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Guilospanck.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":"2021-08-02T22:59:08.000Z","updated_at":"2022-04-03T22:16:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"654a1769-97ae-44ea-8f50-5f87e57a73de","html_url":"https://github.com/Guilospanck/node-and-nginx-with-docker-compose","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/Guilospanck%2Fnode-and-nginx-with-docker-compose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Guilospanck%2Fnode-and-nginx-with-docker-compose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Guilospanck%2Fnode-and-nginx-with-docker-compose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Guilospanck%2Fnode-and-nginx-with-docker-compose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Guilospanck","download_url":"https://codeload.github.com/Guilospanck/node-and-nginx-with-docker-compose/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247446869,"owners_count":20940198,"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":["docker","docker-compose","nginx","nodejs"],"created_at":"2024-10-09T20:09:56.550Z","updated_at":"2025-12-30T22:00:40.258Z","avatar_url":"https://github.com/Guilospanck.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node and NGINX with Docker Compose\nThis repository will serve as a guideline if you want to have a server running NGINX and Node.js with Docker.\n\n## Installation and How To Use\nClone the repository:\n```bash\ngit clone https://github.com/Guilospanck/NodeAndNginxWithDockerCompose\n```\nInstall [Docker](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04);\n\nInstall [Docker Compose](https://docs.docker.com/compose/install/);\n\nInside the project's folder, run docker-compose command:\n```bash\ndocker-compose up -d --build\n```\n- \u003ccode\u003e-d\u003c/code\u003e to run in detach mode\n- \u003ccode\u003e--build\u003c/code\u003e to build images before starting containers\n\n## :arrow_right: REMEMBER TO:\nIf you are using a linux (like Ubuntu) machine in AWS EC2, be aware of UFW (Uncomplicated Firewall):\n  - OR DO NOT ENABLE **UFW**\n  - OR ENABLE IT WITH SSH TOO, OTHERWISE YOU WON'T BE ABLE TO SSH AFTER CONNECTION IS TERMINATED.\n\n### If you are using ENV variables:\n  Remember to set in the docker-compose.yml file, because you're going to need to define which NODE_ENV is going to be used. So, you can do something like this:\n  \n  ```Dockerfile\n  FROM node:14.17.3-alpine\n\nWORKDIR /build\nCOPY package.json yarn.lock ./\nRUN yarn install\nCOPY . .\nRUN yarn build\n\nFROM node:14.17.3-alpine\n\nWORKDIR /app\nCOPY package.json yarn.lock .env.production .sequelizerc newrelic.js package.json ./\nRUN yarn install --production --frozen-lockfile\nCOPY --from=build /build/dist ./\n\nCMD [\"node\", \"main.js\"]   \u003c-- Here you would need something like NODE_ENV=production node main.js, but you're going to set it in the docker-compose file\n  ```\n ```yml\n version: \"3\"\n\nservices:\n    api:\n        container_name: api\n        restart: unless-stopped\n        build:\n            context: ./app\n        ports:\n            - 4444\n        environment:\n            - NODE_ENV=production # \u003c---- HERE!\n        networks: # Obs.: docker compose already creates a default network. So it isn't needed if you don't want to\n            - api\n        \n    nginx:\n        container_name: nginx\n        restart: unless-stopped\n        build:\n            context: ./nginx\n        ports:\n            - 80:80\n        depends_on:\n            - api\n        networks:\n            - api\n\nnetworks:\n    api:\n        driver: bridge\n ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguilospanck%2Fnode-and-nginx-with-docker-compose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguilospanck%2Fnode-and-nginx-with-docker-compose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguilospanck%2Fnode-and-nginx-with-docker-compose/lists"}