pip install pipenv
pipenv shell
to activate the virtual environmentdocker-compose up -d
New packages or installing from scratch:
pipenv lock --clear
pipenv install
npm run install:clean
npm start
cd web && yarn build
This is to avoid docker javascript leap out of memory errordocker build --tag binbot . && docker run -ti -p 8000:80 binbot
docker build --tag binbot . && docker tag binbot carloswufei/binbot:latest && docker push carloswufei/binbot
If docker-compose doesn't exist: 3. Copy scp docker-compose.yml <USERNAME>@<SERVER_IP>:/var/www/binbot.carloswu.com
or docker build --tag binbot . && docker tag binbot carloswufei/binbot:latest && docker push carloswufei/binbot
In production:
docker-compose pull && docker-compose up -d
.env.prod
is modified, scp to remote server and replace .env
in production with new .env.prod
docker build --tag binbot .
docker-compose up
If issues are encountered downloading prod DB to local
docker exec binbot_db sh -c 'mongodump --authenticationDatabase admin -u <user> -p <password> --db binbot --archive' > db.dump
docker exec -i binbot_db sh -c 'mongorestore --archive -u <MONGO_AUTH_USERNAME> -p <MONGO_AUTH_PASSWORD> --authenticationDatabase <MONGO_AUTH_DATABASE> ' < db.dump