forked from rishabkumar7/devops-qr-code
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: The docker-compose file is used to the multi-container.
- Loading branch information
1 parent
d564d78
commit 3620626
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Logs | ||
*.log | ||
*.log.* | ||
|
||
# Environment variables | ||
.env | ||
|
||
# Ignore macOS system files | ||
.DS_Store | ||
|
||
# Ignore local IDE settings | ||
.vscode/ | ||
.idea/ | ||
|
||
# Ignore Docker files (to prevent committing local docker-specific config) | ||
*.dockerignore | ||
docker-compose.override.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
version: '3.8' | ||
services: | ||
frontend: | ||
build: ./front-end-nextjs | ||
working_dir: /app | ||
command: sh -c "npm run build && npm start" | ||
ports: | ||
- "3000:3000" # Map host port 3000 to container port 3000 | ||
volumes: | ||
- ./front-end-nextjs:/app | ||
environment: | ||
- NODE_ENV=production | ||
depends_on: | ||
- backend # Ensure frontend waits for backend to start | ||
|
||
backend: | ||
build: ./api | ||
ports: | ||
- "8000:80" # Map host port 8000 to container port 80 (FastAPI) | ||
volumes: | ||
- ./api:/usr/src/app # Bind mount for live updates | ||
environment: | ||
- FASTAPI_ENV=production |