Skip to content

Commit

Permalink
Add running instructions via docker
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammetssen committed Nov 1, 2022
1 parent 2d98a5e commit fc76c8e
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
## Running with Docker


### Database
```bash
docker run --net host -it -d --name mongo mongo:latest
```

### Backend
#### Setting up the environment
1. Go to the server folder
2. Create a `.env` file in `src/` folder with the following variables
```json
PORT=5000
GMAIL_USERNAME=<EMAIL_ADDRESS>
GMAIL_PASSWORD=<EMAIL_PASSWORD>
JWT_AC_KEY = a_very_secret_value
JWT_REF_KEY = another_very_secret_value
FRONTEND_URL = http://localhost:8008
DB=mongodb://localhost:27017/bucademy
```
#### Building and running
```bash
cd server
docker build -t server:latest .
docker run --net host -it -d --name server server:latest
```
### Frontend
#### Setting up the environment
1. Go to the client folder
2. Update the `API_URL` variable in `next.config.json` file. In our case, set it to `http://localhost:5000`
#### Building and running
```bash
docker built -t client:latest .
docker run --net host --name front client:latest
```
Go to localhost:8008 in your browser

0 comments on commit fc76c8e

Please sign in to comment.