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
2006f56d5f23
Commit
2006f56d5f23
authored
5 years ago
by
Vincent Hatakeyama
Browse files
Options
Downloads
Patches
Plain Diff
add elements to help build an image with module static
parent
1f24b9bc5c62
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile.odoo-static
+15
-0
15 additions, 0 deletions
Dockerfile.odoo-static
docker_build_copy
+4
-2
4 additions, 2 deletions
docker_build_copy
with
19 additions
and
2 deletions
Dockerfile.odoo-static
0 → 100644
+
15
−
0
View file @
2006f56d
FROM nginx:alpine
ARG REVISION=""
ARG VENDOR=""
ARG VERSION=""
ARG AUTHORS=""
ARG CREATED=""
ARG TITLE=""
LABEL org.opencontainers.image.revision=$REVISION
LABEL org.opencontainers.image.vendor=$VENDOR
LABEL org.opencontainers.image.version=$VERSION
LABEL org.opencontainers.image.authors=$AUTHORS
LABEL org.opencontainers.image.created=$CREATED
LABEL org.opencontainers.image.title=$TITLE
ADD static /usr/share/nginx/html
This diff is collapsed.
Click to expand it.
docker_build_copy
+
4
−
2
View file @
2006f56d
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
# TODO add a way to bypass the value, maybe with a key in the setup.cfg file
# TODO add a way to bypass the value, maybe with a key in the setup.cfg file
here
=
$(
dirname
$0
)
here
=
$(
dirname
$0
)
project_home
=
$(
cd
$here
&&
cd
..
&&
echo
$PWD
)
project_home
=
$(
cd
$here
&&
cd
..
&&
echo
$PWD
)
static_dir
=
$project_home
/static/
if
type
"python3"
>
/dev/null
;
if
type
"python3"
>
/dev/null
;
then
then
odoo_modules
=
"
$(
python3
-B
-c
"import configparser ; c = configparser.SafeConfigParser() ; c.read('
${
project_home
}
/setup.cfg') ; print (c.has_option('odoo_scripts', 'modules') and ' '.join(c.get('odoo_scripts', 'modules').split()) or '')"
)
"
odoo_modules
=
"
$(
python3
-B
-c
"import configparser ; c = configparser.SafeConfigParser() ; c.read('
${
project_home
}
/setup.cfg') ; print (c.has_option('odoo_scripts', 'modules') and ' '.join(c.get('odoo_scripts', 'modules').split()) or '')"
)
"
...
@@ -25,4 +26,5 @@
...
@@ -25,4 +26,5 @@
python2
-B
-c
"import ConfigParser ; c = ConfigParser.SafeConfigParser() ; c.read('
${
project_home
}
/setup.cfg') ; print(','.join(c.get('odoo_scripts', 'module_list').split()))"
>
$project_home
/odoo_modules_list
python2
-B
-c
"import ConfigParser ; c = ConfigParser.SafeConfigParser() ; c.read('
${
project_home
}
/setup.cfg') ; print(','.join(c.get('odoo_scripts', 'module_list').split()))"
>
$project_home
/odoo_modules_list
fi
fi
mkdir
-p
$project_home
/odoo_modules
mkdir
-p
$project_home
/odoo_modules
set
-e
rsync
--delete
-C
--exclude
=
'.hg*'
--exclude
=
'.git*'
--links
--exclude
=
'*.pyc'
-r
--times
$(
eval echo
$odoo_modules
)
$project_home
/odoo_modules
rsync
--delete
-C
--exclude
=
'.hg*'
--exclude
=
'.git*'
--links
--exclude
=
'*.pyc'
-r
--times
$(
eval echo
$odoo_modules
)
$project_home
/odoo_modules
...
@@ -28,2 +30,4 @@
...
@@ -28,2 +30,4 @@
rsync
--delete
-C
--exclude
=
'.hg*'
--exclude
=
'.git*'
--links
--exclude
=
'*.pyc'
-r
--times
$(
eval echo
$odoo_modules
)
$project_home
/odoo_modules
rsync
--delete
-C
--exclude
=
'.hg*'
--exclude
=
'.git*'
--links
--exclude
=
'*.pyc'
-r
--times
$(
eval echo
$odoo_modules
)
$project_home
/odoo_modules
# this only sync static from our modules
rsync
--include
=
'/*/static/***'
--exclude
=
'/*/*'
-r
--times
--prune-empty-dirs
$(
eval echo
$odoo_modules
)
$static_dir
fi
fi
...
@@ -29,3 +33,1 @@
...
@@ -29,3 +33,1 @@
fi
fi
exit
$?
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