Skip to content

Instantly share code, notes, and snippets.

@nehemiascr
Created March 6, 2018 12:26
Show Gist options
  • Save nehemiascr/250cd380084176024a91b81c255517ec to your computer and use it in GitHub Desktop.
Save nehemiascr/250cd380084176024a91b81c255517ec to your computer and use it in GitHub Desktop.
Some docker commands for odoo
:::::::::::::::::::::::::::
:::::::::::::::: SSH tunnel
sudo launchctl stop com.edb.launchd.postgresql-9.3
ssh -N -L 5432:127.0.0.1:5432 -i /path/to/key.pem [email protected]
ssh -i /path/to/key.pe [email protected]
:::::::::::::::::::::::::::
::::::::::::: base de datos
docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -p 5342:5432 --name db postgres
docker run -p 5050:5050 --link fb:postgresql --name pgadmin nphung/pgadmin
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::: contenedor de odoo con carpeta addons como volumen
docker run --volume ~/local/addons:/mnt/extra-addons -p 8069:8069 --name odoo --link db:db -t odoo:11
-+--{__[:::]__}--+-
::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::: executar comandos en contenedor
docker exec -it -u 0 odoo bash
::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::: guardar contenedor en .tar
docker save -o respaldo.tar db
::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::: descargar .tar del servidor
scp -i ~/.ssh/key.pem [email protected]:/server/path/respaldo.tar /local/path/respaldo.tar
:::: bitnami :::::::::::::::::::::::
sudo chown -R daemon:daemon /home/bitnami/addons/
sudo /opt/bitnami/apps/odoo/bnconfig --disable_banner 1
sudo /opt/bitnami/ctlscript.sh restart apache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment