V2.0
Procédure de mise en Recette/Production
⚠ Mise en recette seulement:
- Backup des données de recette
docker exec -it rec_database-ram-rec_1 bash
mkdir /dump
mongodump --authenticationDatabase admin --username root -d ram -h localhost
docker cp <containerId>:/dump /host/path/target
- Get prod data
tar -xf file
Update .migrate file with prod (Keep a save in case)
restore prod DB data to db container and create ./restore folder
docker cp ./mongo__database-ram_20221202-020800/ rec_database-ram-rec_1:./dump
docker exec -it CONTAINER bash
mongorestore --authenticationDatabase admin --username root -d ./dump/mongo__database-ram_20221202-020800/ram
Préparation de l'environnement
- Update des variables d'environnement
# Mailchimp
MC_API_KEY=
MC_SERVER=
MC_LIST_ID=
MAIL_SOSTECH=????
- Update des tag docker-compose
registry.forge.grandlyon.com/web-et-numerique/factory/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_server/feat:v2.0.1 to registry.forge.grandlyon.com/web-et-numerique/factory/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_server/tags:v2.0.0
- Update variables dans docker-compose server
MAIL_CONTACT: ${MAIL_CONTACT}
MAIL_SOSTECH: ${MAIL_SOSTECH}
MC_API_KEY: ${MC_API_KEY}
MC_SERVER: ${MC_SERVER}
MC_LIST_ID: ${MC_LIST_ID}
Déploiement
docker login registry.forge.grandlyon.com -u resin_deploy -p TOKEN (Token can be find on server)
docker-compose pull service-ram
docker-compose pull web-app
docker-compose up service-ram
docker-compose up -d
⚠ Only for rec. Test Data
Remove users from DB and keep only
- Erwan
- admin
Reset all INDEX
- Connect as admin for token
- reset structure index
- reset user index
- reset tcl data
- rest employer index
Edited by Hugo SUBTIL