Skip to content

Commit

Permalink
Created a docker-compose file for fullstack development
Browse files Browse the repository at this point in the history
The docker-compose file manages the containers and provides the needed
environment for development.

References:
Building and deploying Next.js applications with Docker - YouTube
https://www.youtube.com/watch?v=aNh8iShFXto

Koyeb - How to Dockerize and Deploy a Next.js Application on Koyeb
https://www.koyeb.com/tutorials/how-to-dockerize-and-deploy-a-next-js-application-on-koyeb

How To Connect Docker With Python Flask And ReactJS FrontEnd | Docker Flask React Made Easy| 2021 HD - YouTube
https://www.youtube.com/watch?v=ISCiJmY1g2M

react-flask-postgres-boilerplate-with-docker/docker-compose.yml at master · tomahim/react-flask-postgres-boilerplate-with-docker
https://github.com/tomahim/react-flask-postgres-boilerplate-with-docker/blob/master/docker-compose.yml

Implement Docker With Hot Reloading In Next JS | by Bikash dulal | wesionaryTEAM | Medium
https://medium.com/wesionary-team/impledocker-with-hot-reloading-in-next-js-f3e57fba84ce

Bikash888/nextjs-docker
https://github.com/Bikash888/nextjs-docker

Hot Reloading not working in Next.js 9 using custom routing, styled components and withApollo example · Issue #16449 · vercel/next.js
vercel/next.js#16449

NextJS Fast Refresh - GeeksforGeeks
https://www.geeksforgeeks.org/nextjs-fast-refresh/
  • Loading branch information
ChubaOraka committed Aug 6, 2022
1 parent b79a5f6 commit e43baa6
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
version: '3.5'

services:
client:
container_name: client
build:
context: ./client
ports:
- "3000:3000"
volumes:
- ./client:/usr/src/app/client
- /usr/src/app/client/node_modules
- /usr/src/app/client/.next
depends_on:
- server

server:
container_name: server
build:
context: ./backend
volumes:
- './backend:/app'
ports:
- 5000:5000
environment:
- APP_NAME={{aliascheck.app_name}}
- FLASK_DEBUG=1
- PYTHONUNBUFFERED=0
- APP_SETTINGS=app.config.DevelopmentConfig
- DATABASE_URL=postgresql://postgres:postgres@db:5432/users_dev
- DATABASE_TEST_URL=postgresql://postgres:postgres@db:5432/users_test
- SECRET_KEY=change_me_in_prod
depends_on:
- db

db:
container_name: db
build:
context: ./backend/app/db
ports:
- 5432:5432
volumes:
- /var/lib/postgresql/data
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASS=

0 comments on commit e43baa6

Please sign in to comment.