Gymmy app, api and database in one simple solution.
-
Environment variables
This setup will use variables located in .local.env. Create this file editing example.local.env
-
App and Api
cd app && npm install npm start cd api && npm install node src/Server.js
-
Mongo
You need to create an admin user in MongoDBCompass. See mongo README.md.
-
Environment variables
This setup will use variables located in .dev.docker-compose.env. Create this file editing example.docker-compose.env
-
Start services
cd app && npm install cd .. cd api && npm install cd .. docker-compose -f dev.docker-compose.yaml up --build -d [services...]
-
Stop and cleanup
docker-compose -f dev.docker-compose.yaml down -v [services...]
-
-
Modify
REACT_APP_API_URL=http://<IP>:8080
inapp/.env.production
with Server URL -
Modify jwt and db connection in
api/docker_envs/.env.production
# ------ Api --------- .... DB_ADMIN=admin DB_ADMIN_PWD=password DB_CONNECTION=mongodb://<containerName>:27017/ example: DB_CONNECTION=mongodb://mongo1:27017/ JWT_SECRET=secret
-
Modify jwt and db connection in
mongo/docker_envs/.env.production
# ------ Api --------- .... MONGO_INITDB_ROOT_USERNAME=admin MONGO_INITDB_ROOT_PASSWORD=password MONGO_INITDB_DATABASE=gymmy
-
Modify
-
docker-compose -f prod.docker-compose.yaml up --build -d [services...]
-
docker-compose -f prod.docker-compose.yaml up --build -d [services...]
-
docker-compose -f prod.docker-compose.yaml ps