Skip to content

Commit 944c299

Browse files
committed
Add /fixperms script within container
1 parent b3ee0e1 commit 944c299

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ ENV ODOO_RC /etc/odoo/odoo.conf
110110

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

113+
COPY fixperms /fixperms
114+
RUN chmod +x /fixperms
115+
116+
113117
# Set default user when running the container
114118
USER odoo
115119

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ Future improvement: write another outer script that will clone a specific
3434
tag in a tempdir, and release what was pushed to git rather than what
3535
happens to be in your working copy - or make CI do it on new tag/PR/whatever.
3636

37+
# Fixing volume permissions
38+
39+
```#!sh
40+
docker-compose run --rm -u root odoo /fixperms
41+
```
42+
3743
# Locales
3844

3945
Locales are generated for en_GB, and are set as default in the environment.

fixperms

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
set -e
3+
if [ "$(id -u)" != 0 ]
4+
then
5+
echo "$0: WARNING: You aren't running as superuser so this might not work" >&2
6+
fi
7+
8+
chown -R odoo:odoo /var/lib/odoo

0 commit comments

Comments
 (0)