Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rvalyi/3c4adfcfcf8a4cb73c8ab10ddafaef38 to your computer and use it in GitHub Desktop.
Save rvalyi/3c4adfcfcf8a4cb73c8ab10ddafaef38 to your computer and use it in GitHub Desktop.
# install on Ubuntu Server 20.04 LTS (Ubuntu Focal) or Debian 10 (Buster)
sudo apt-get update
sudo apt-get install byobu
byobu
# install Docker:
sudo apt-get install -y\
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
sudo apt install docker.io
# Start docker and enable it to start after the system reboot:
sudo systemctl enable --now docker
# give user administrative privileges to docker:
sudo usermod -aG docker $USER
# logout and login again
# check that Docker is working with
docker ps
# install ak and docky:
sudo apt-get install python3-pip
python3 -m pip install git+https://github.com/akretion/ak.git#egg=ak
python3 -m pip install git+https://github.com/akretion/docky.git#egg=docky
# or pip3 install on Debian may be
# install and run an Odoo Docky template https://github.com/akretion/docky-odoo-template
# alternatively, if you have an existing Docky project, clone your Docky repository instead
git clone https://github.com/akretion/docky-odoo-template odoo_project
# you can use Docky with Traefik (handy for dev) or Nginx, but this command is required for this Docky template:
docker network create traefik
cd odoo_project/odoo
ak build
cd ..
docky init # create the .env file and accept dev mode for now.
# if you cloned a Docky template, choose no to "generate docker-compose.yml automatically?"
# now edit the .env file and define the following environment variables PGHOST, PGDATABASE, PGUSER, DB_USER
# so your .env file may look like (cat .env here)
UID=1000
ENV=dev
COMPOSE_FILE=docker-compose.yml:dev.docker-compose.yml
COMPOSE_PROJECT_NAME=main-user_odoo-project
PGHOST=db
PGDATABASE=db
PGUSER=odoo
DB_USER=odoo
# Now you should be good to run Docky!
docky run
# start Odoo inside the Docky container
odoo
# let's move out of the Docky container back into the host to finish the installation,
# you can use F2 or F4 to move to another Byobu tab for that for instance.
# you might learn more about Docky here https://github.com/akretion/docky
# now install nginx
apt-get install nginx
# credit for nginx config: https://github.com/Yenthe666/InstallScript
wget https://gist.githubusercontent.com/rvalyi/2d53b88d9260d99aaacd0f10493ba1db/raw/b4bb944e06407a244fde135c7ef5ff3063f63e77/odoo-nginx.cfg
# edit the configuration:
vi odoo-nginx.cfg
# and replace:
#$WEBSITE_NAME -> *.* or real site name
#$OE_USER -> odoo
#$OE_PORT -> 8069
#$LONGPOLLING_PORT -> 8072
sudo mv odoo-nginx.cfg /etc/nginx/sites-available/odoo
sudo ln -s /etc/nginx/sites-available/odoo /etc/nginx/sites-enabled/odoo
sudo rm /etc/nginx/sites-enabled/default
sudo service nginx reload
# then configure it...
# to be continued
# TODO nginx config, letsencrypt, backups...
@rvalyi
Copy link
Author

rvalyi commented Oct 15, 2020

sorry I used the script again and I don't see that kind of issue neither on Ubuntu neither on Debian.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment