-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from guewen/update-example
Update example
- Loading branch information
Showing
11 changed files
with
229 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
# | ||
# Build the image | ||
# | ||
# Normally run by the Makefile: | ||
# | ||
# $ make VERSION=$VERSION build | ||
# | ||
# It expects the following variables to be set: | ||
# | ||
# * VERSION (9.0, 10.0, 11.0, ...) | ||
# * IMAGE_LATEST (tag of the 'latest' image built) | ||
# * DOCKERFILE (name of the file used for the Docker build) | ||
# | ||
|
||
if [ -z "$VERSION" ]; then | ||
echo "VERSION environment variable is missing" | ||
exit 1 | ||
fi | ||
|
||
TMP=$(mktemp -d) | ||
echo "Working in $TMP" | ||
|
||
on_exit() { | ||
echo "Cleaning up temporary directory..." | ||
rm -rf $TMP | ||
rm -f /tmp/odoo.tar.gz | ||
} | ||
|
||
trap on_exit EXIT | ||
|
||
cp -r ${VERSION}/. ${TMP}/ | ||
cp -r bin/ ${TMP} | ||
cp -r common/* ${TMP} | ||
sed -i "1i FROM ${IMAGE_LATEST}" ${TMP}/Dockerfile-onbuild | ||
sed -i "1i FROM ${NAME}:${VERSION}-latest" ${TMP}/Dockerfile-batteries | ||
cp -r install/ ${TMP} | ||
cp -r start-entrypoint.d/ ${TMP} | ||
cp -r before-migrate-entrypoint.d/ ${TMP} | ||
|
||
docker build --no-cache -f ${TMP}/${DOCKERFILE} -t ${IMAGE_LATEST} ${TMP} | ||
docker build --no-cache -f ${TMP}/Dockerfile-onbuild -t ${IMAGE_LATEST}-onbuild ${TMP} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
9.0.0 | ||
11.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Composition used to run automated tests on the images | ||
# Used by the Makefile at the repository's root | ||
|
||
version: '2' | ||
|
||
services: | ||
odoo: | ||
build: ./odoo/ | ||
depends_on: | ||
- db | ||
volumes: | ||
- "data-odoo:/data/odoo" | ||
environment: | ||
- DB_USER=odoo | ||
- DB_PASS=odoo | ||
- DB_NAME=odoodb | ||
- RUNNING_ENV=dev | ||
- LOG_HANDLER=:WARN | ||
- MARABUNTA_MODE=demo # could be 'full' for the db with all the data | ||
# cached database dumps config for `runmigration` and `runtests` | ||
- CREATE_DB_CACHE=false # set it to 'true' to create dumps | ||
- LOAD_DB_CACHE=true # by default will always search for existing dumps | ||
# SUBS_MD5 is `runtests` only, you need to define it to identify dumps, | ||
# a good practice is to generate it based on the content you have in | ||
# your dependencies (`odoo/src`, `odoo/external-src`) | ||
# See README.md for more. | ||
- SUBS_MD5= | ||
# MIG_LOAD_VERSION is `runmigration` only, define it if you want to load | ||
# a prior release dump that doesn't match `odoo/VERSION` number. | ||
# See README.md for more. | ||
- MIG_LOAD_VERSION_CEIL= | ||
|
||
db: | ||
image: postgres:9.6 | ||
ports: | ||
- 5432 | ||
environment: | ||
- POSTGRES_USER=odoo | ||
- POSTGRES_PASSWORD=odoo | ||
volumes: | ||
- "data-db:/var/lib/postgresql/data" | ||
|
||
volumes: | ||
data-odoo: | ||
data-db: |
Oops, something went wrong.