Added docker compose and example env file.
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
|||||||
|
# Database
|
||||||
|
MONGODB_ROOT_USERNAME=mongo_user
|
||||||
|
MONGODB_ROOT_PASSWORD=mongo_pass
|
||||||
|
MONGODB_URI=mongodb://mongo_user:mongo_pass@database:27017
|
||||||
|
|
||||||
|
# SMTP
|
||||||
|
SMTP_SERVICE=gmail
|
||||||
|
SMTP_EMAILADDR=example@gmail.com
|
||||||
|
SMTP_PASSWORD=app pass here
|
||||||
|
SMTP_HOST=smtp.gmail.com
|
||||||
|
SMTP_PORT=587
|
||||||
|
|
||||||
|
# Cloudinary
|
||||||
|
CLOUDINARY_CLOUD_NAME=cloudname_here
|
||||||
|
CLOUDINARY_API_KEY=api_key_here
|
||||||
|
CLOUDINARY_API_SECRET=api_secret_here
|
||||||
|
|
||||||
|
# Gemini
|
||||||
|
GEMINI_API_KEY=gemini_api_here
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
services:
|
||||||
|
backend:
|
||||||
|
container_name: cropcompass-backend
|
||||||
|
image: kshitijka/cropcompass-backend:1.1.0
|
||||||
|
restart: no
|
||||||
|
security_opt:
|
||||||
|
- no-new-privileges:true
|
||||||
|
user: "nonroot:nonroot"
|
||||||
|
ports:
|
||||||
|
- "8000:8000" # Do not change
|
||||||
|
environment:
|
||||||
|
- FRONTEND_URI=http://frontend:3000 # Do not change
|
||||||
|
- MONGODB_URI=${MONGODB_URI}
|
||||||
|
- SMTP_SERVICE=${SMTP_SERVICE}
|
||||||
|
- SMTP_EMAILADDR=${SMTP_EMAILADDR}
|
||||||
|
- SMTP_PASSWORD=${SMTP_PASSWORD}
|
||||||
|
- SMTP_HOST=${SMTP_HOST}
|
||||||
|
- SMTP_PORT=${SMTP_PORT}
|
||||||
|
- CLOUDINARY_CLOUD_NAME=${CLOUDINARY_CLOUD_NAME}
|
||||||
|
- CLOUDINARY_API_KEY=${CLOUDINARY_API_KEY}
|
||||||
|
- CLOUDINARY_API_SECRET=${CLOUDINARY_API_SECRET}
|
||||||
|
- GEMINI_API_KEY=${GEMINI_API_KEY}
|
||||||
|
networks:
|
||||||
|
- cropcompass-ntwk
|
||||||
|
depends_on:
|
||||||
|
- database
|
||||||
|
env_file:
|
||||||
|
- .exampleenv
|
||||||
|
|
||||||
|
frontend:
|
||||||
|
container_name: cropcompass-frontend
|
||||||
|
image: kshitijka/cropcompass-frontend:1.1.0
|
||||||
|
restart: no
|
||||||
|
security_opt:
|
||||||
|
- no-new-privileges:true
|
||||||
|
user: "nonroot:nonroot"
|
||||||
|
ports:
|
||||||
|
- "3000:3000" # Do not change
|
||||||
|
networks:
|
||||||
|
- cropcompass-ntwk
|
||||||
|
depends_on:
|
||||||
|
- backend
|
||||||
|
|
||||||
|
database:
|
||||||
|
container_name: cropcompass-db
|
||||||
|
image: mongo:latest
|
||||||
|
restart: no
|
||||||
|
security_opt:
|
||||||
|
- no-new-privileges
|
||||||
|
environment:
|
||||||
|
- MONGO_INITDB_ROOT_USERNAME=${MONGODB_ROOT_USERNAME}
|
||||||
|
- MONGO_INITDB_ROOT_PASSWORD=${MONGODB_ROOT_PASSWORD}
|
||||||
|
- MONGO_INITDB_DATABASE=CropCompass # Do not change
|
||||||
|
networks:
|
||||||
|
- cropcompass-ntwk
|
||||||
|
env_file:
|
||||||
|
- .exampleenv
|
||||||
|
|
||||||
|
networks:
|
||||||
|
cropcompass-ntwk:
|
||||||
|
driver: bridge
|
||||||
Reference in New Issue
Block a user