Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Odoo scripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
XCG
Odoo scripts
Commits
10cbb3a54158
Commit
10cbb3a54158
authored
7 years ago
by
Vincent Hatakeyama
Browse files
Options
Downloads
Patches
Plain Diff
change permission in data volume
parent
c31f104d090c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docker_dev_start.py
+11
-0
11 additions, 0 deletions
docker_dev_start.py
with
11 additions
and
0 deletions
docker_dev_start.py
+
11
−
0
View file @
10cbb3a5
...
...
@@ -258,6 +258,17 @@
options
.
append
(
'
--mount
'
)
data_volume_name
=
'
{}_data
'
.
format
(
project_name
)
logging
.
debug
(
'
Using data volume %s
'
,
data_volume_name
)
volumes
=
docker_client
.
volumes
(
filters
=
{
'
name
'
:
data_volume_name
})
if
volumes
[
'
Volumes
'
]:
logging
.
debug
(
'
Volume %s already exist
'
,
data_volume_name
)
volume
=
volumes
[
'
Volumes
'
][
0
]
else
:
logging
.
debug
(
'
Creating volume %s
'
,
data_volume_name
)
volume
=
docker_client
.
create_volume
(
name
=
data_volume_name
)
# make sure the permission in the volume are correct
# TODO replace by something cleaner...
mount_point
=
volume
[
'
Mountpoint
'
]
call
([
'
sudo
'
,
'
chmod
'
,
'
777
'
,
mount_point
])
options
.
append
(
'
source={},target=/mnt/data
'
.
format
(
data_volume_name
))
arg
.
append
(
'
--data-dir /mnt/data
'
)
else
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment