Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ ENV ODOO_RC /etc/odoo/odoo.conf

COPY wait-for-psql.py /usr/local/bin/wait-for-psql.py

COPY fixperms /fixperms
RUN chmod +x /fixperms


# Set default user when running the container
USER odoo

Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ Future improvement: write another outer script that will clone a specific
tag in a tempdir, and release what was pushed to git rather than what
happens to be in your working copy - or make CI do it on new tag/PR/whatever.

# Fixing volume permissions

```#!sh
docker-compose run --rm -u root odoo /fixperms
```

# Locales

Locales are generated for en_GB, and are set as default in the environment.
Expand Down
8 changes: 8 additions & 0 deletions fixperms
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
set -e
if [ "$(id -u)" != 0 ]
then
echo "$0: WARNING: You aren't running as superuser so this might not work" >&2
fi

chown -R odoo:odoo /var/lib/odoo