-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2d98a5e
commit fc76c8e
Showing
1 changed file
with
37 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,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 |