Create Reverse Proxy Configuration For Odoo Containers
Project description
mkdir nginx_conf
docker run -d -v "$PWD/../nginx_conf:/etc/nginx/conf.d" -p 80:80 --name odoo nginx
python3 -m odoo_reverse_proxy -c odoo -f ../nginx_conf
docker-compose -f exemple_odoo_compose.yml up
# Install certbot on nginx container
mkdir -p /var/www/letsencrypt
apt update
apt install -y software-properties-common
add-apt-repository ppa:certbot/certbot
apt update
apt install -y python-certbot-apache apt install gnupg
apt install -y certbot
apt install -y python-certbot-nginx
If this is not working, the generated template may be wrong. Check it by running:
docker exec odoo nginx -s reload
where odoo is your nginx container
Issues
Port is lost with redirection: accessing odoo_server.localhost:8000 redirect us to odoo_server.localhost/web, we can only use port 80 (and maybe 443) as forward for nginx
Some values are override manually (web_upstream, proxy_pass and poll_upstream): remove them from config and template?
TODO
Add certbot support
Make the python program available on pypi
Create dockerfile, docker image and docker-compose for the service
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
odoo_auto_proxy-0.1.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for odoo_auto_proxy-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5611f6930961868c87882b6833fb9af1afa928ae45cdd16319d66706944e3917 |
|
MD5 | dc383331ad707a87fdfdb8cb230afbe0 |
|
BLAKE2b-256 | c6f07931ab78903f7ea1a8ec7ad5b062713843e9770936195258912d2f1c4e77 |