Skip to content

Instantly share code, notes, and snippets.

@yahyaanwar
Last active September 22, 2022 03:02
Show Gist options
  • Save yahyaanwar/6ef3c8e4b9b72f830511a30af10f744e to your computer and use it in GitHub Desktop.
Save yahyaanwar/6ef3c8e4b9b72f830511a30af10f744e to your computer and use it in GitHub Desktop.
Run Odoo project via Linksoft's docker image

dockodoo.bash file:

#!/usr/bin/env bash
project_dir=$1
shift
port=$1
shift
image=$(docker image ls  \
  --format "table {{.ID}}\t{{.Tag}}\t{{.Repository}}" \
  | grep "hub.linksoft" | fzf) && \
image=$(echo $image | cut -d" " -f1) && \
docker run \
  -v $(pwd)/${project_dir}/workdir:/opt/deploy/workdir \
  -v $(pwd)/${project_dir}/data:/opt/deploy/data \
  -p 0.0.0.0:${port}:8069 \
  --rm -it ${image} \
  /opt/deploy/venv/bin/python -u \
  /opt/deploy/venv/bin/odoo \
  -c /opt/deploy/workdir/conf/odoo.conf \
  ${@}

Run above script: ./dockodoo.bash Development/Odoo/project_folder 51599

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