System Manual for Fitness and Diet Forum - bounswe/bounswe2024group4 GitHub Wiki
System Requirements
We are using a 4 GB RAM 2 vCPU 80 GB disk space AMD machine on DigitalOcean, which is sufficient for the application to be run. While weaker machines can be enough for the application's regular operation, we found that the time necessary for frontend compilation significantly increases with a weaker machine, so we opted for this one.
Docker installation
Follow this guide to install Docker on a DigitalOcean machine.
Installing the app (backend and frontend)
Whole application can be run either with Docker compose or by running each component on its own.
Docker compose approach
-
Install
docker composeby following this guide. -
Set the
.envfile under root directory to
DB_NAME=fitness_app
DB_USER=root
DB_PASSWORD=****
DB_HOST=localhost
DB_PORT=3306
EXERCISES_API_KEY=
EDAMAM_APP_ID=
EDAMAM_APP_KEY=
FIREBASE_TYPE="service_account"
FIREBASE_PROJECT_ID=
FIREBASE_PRIVATE_KEY_ID=
FIREBASE_PRIVATE_KEY=
FIREBASE_CLIENT_EMAIL=
FIREBASE_CLIENT_ID=
FIREBASE_AUTH_URI=
FIREBASE_TOKEN_URI=
FIREBASE_AUTH_PROVIDER_X509_CERT_URL="https://www.googleapis.com/oauth2/v1/certs"
FIREBASE_CLIENT_X509_CERT_URL=
FIREBASE_UNIVERSE_DOMAIN="googleapis.com"
Set the .env file under frontend to:
REACT_APP_API_URL=127.0.0.1
- Run
docker compose up.
Separate components approach
- Set the .env files in the same manner as step 2 of
Docker compose approach. - Follow through the backend's
READMEto run the backend. - Follow through the frontend's
READMEto run frontend.
Frontend will be up at http://127.0.0.1:3000.
Mobile
- Set the .env file under
mobiledirectory to
EXPO_PUBLIC_API_URL=DEPLOY_URL
- Run
npm install. - Create an Android device in Android Studio.
- Run
npx expo startand pressato run Android emulation on Android Studio.