how do i install this using docker
- User
how do i install this using docker
Assistant
To install and run Monkeytype using Docker, you can follow these steps based on the provided files:
1. Build the Docker images:
- Navigate to the root directory of the repository.
- Build the backend image:
bash
docker build --progress=plain --no-cache -t monkeytype/monkeytype-backend:latest . -f ./docker/backend/Dockerfile - Build the frontend image:
bash
docker build --progress=plain --no-cache -t monkeytype/monkeytype-frontend:latest . -f ./docker/frontend/Dockerfile
2. Run the application using
docker-compose:- Ensure you have Docker Compose installed.
- Navigate to the root directory of the repository.
- Create a
.envfile and populate it with your desired environment variables.- Example
.env:codeHTTP_PORT=8080 BACKEND_PORT=5005 MONGO_PORT=27017 REDIS_PORT=6379 MONKEYTYPE_FRONTENDURL=http://localhost:8080 MONKEYTYPE_BACKENDURL=http://localhost:5005 # FIREBASE_APIKEY= # FIREBASE_AUTHDOMAIN= # FIREBASE_PROJECTID= # FIREBASE_STORAGEBUCKET= # FIREBASE_MESSAGINGSENDERID= # FIREBASE_APPID= # RECAPTCHA_SITE_KEY= # RECAPTCHA_SECRET= - Note: If using Firebase authentication, you will need to populate the
FIREBASE_*environment variables. Similarly for ReCaptcha you need to populateRECAPTCHA_*variables.
- Example
- Run
docker-compose up -d:This command will:bashdocker-compose up -d- Start the frontend, backend, Redis, and MongoDB containers in detached mode.
- Set up the necessary networking between containers.
- Expose the frontend on the port specified by the
HTTP_PORTenvironment variable (default: 8080) - Expose the backend on the port specified by the
BACKEND_PORTenvironment variable (default: 5005) - By default the mongodb and redis ports are not exposed, you need to uncomment the ports in if you want to access them from outside the docker network.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.