[ADD] docker : new hierchical layout
- Dockerfile.dev : development - Dockerfile.prod.* : prod - Dockerfile.*.pkg : odoo from package - Dockerfile.*.src : odoo from source
This commit is contained in:
parent
7de2b52bf8
commit
89cd1c6f67
7 changed files with 98 additions and 6 deletions
|
|
@ -4,10 +4,11 @@ services:
|
|||
- docker
|
||||
|
||||
script:
|
||||
- docker build -f docker/Dockerfile.core -t technolibre/erplibre-core:12.0 docker/
|
||||
- docker build -f docker/Dockerfile.base -t technolibre/erplibre-base:12.0 docker/
|
||||
- docker build -f docker/Dockerfile.dev -t technolibre/erplibre:12.0 docker/
|
||||
- docker build -f docker/Dockerfile.pkg -t technolibre/erplibre:12.0-pkg docker/
|
||||
|
||||
after_success:
|
||||
- docker login --username mikefaille --password "${DOCKER_TOKEN}"
|
||||
- docker push technolibre/erplibre-core:12.0
|
||||
- docker push technolibre/erplibre:12.0
|
||||
- docker push technolibre/erplibre:12.0-pkg
|
||||
|
|
|
|||
50
docker-compose-dev.yml
Normal file
50
docker-compose-dev.yml
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
version: "3.3"
|
||||
services:
|
||||
ERPLibre:
|
||||
image: technolibre/erplibre-dev:12.0
|
||||
# image: technolibre/erplibre-prod:pkg-12.0
|
||||
# image: technolibre/erplibre-prod:deb-12.0
|
||||
ports:
|
||||
- 8069:8069
|
||||
environment:
|
||||
HOST: db
|
||||
PASSWORD: mysecretpassword
|
||||
USER: odoo
|
||||
POSTGRES_DB: odoo
|
||||
CURRENT_UID: ${CURRENT_UID}
|
||||
depends_on:
|
||||
- db
|
||||
networks:
|
||||
- front
|
||||
command: odoo -c /ERPLibre/odoo/odoo.conf --without-demo=ALL -i base -d odoo
|
||||
user: ${CURRENT_UID:?"Please run as follows 'CURRENT_UID=$(id -u):$(id -g) docker-compose up'"}
|
||||
# user:
|
||||
volumes:
|
||||
- .:/ERPLibre
|
||||
# See the volume section at the end of the file
|
||||
- erplibre_data_dir:/var/lib/odoo
|
||||
|
||||
db:
|
||||
image: postgres:12.3
|
||||
environment:
|
||||
POSTGRES_PASSWORD: mysecretpassword
|
||||
POSTGRES_USER: odoo
|
||||
POSTGRES_DB: odoo
|
||||
networks:
|
||||
- front
|
||||
|
||||
|
||||
networks:
|
||||
front:
|
||||
|
||||
driver: bridge
|
||||
ipam:
|
||||
driver: default
|
||||
config:
|
||||
- subnet: 172.16.237.0/24
|
||||
|
||||
# We configure volume without specific destination to let docket manage it. To configure it through docker use (read related documentation before continuing) :
|
||||
# - docker volume --help
|
||||
# - docker-compose down --help
|
||||
volumes:
|
||||
erplibre_data_dir:
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
version: "3.3"
|
||||
services:
|
||||
ERPLibre:
|
||||
image: technolibre/erplibre-dev:12.0
|
||||
image: technolibre/erplibre:12.0-pkg
|
||||
# image: technolibre/erplibre:12.0-src
|
||||
ports:
|
||||
- 8069:8069
|
||||
environment:
|
||||
|
|
@ -15,7 +16,6 @@ services:
|
|||
networks:
|
||||
- front
|
||||
command: odoo -c /ERPLibre/odoo/odoo.conf --without-demo=ALL -i base -d odoo
|
||||
user: ${CURRENT_UID:?"Please run as follows 'CURRENT_UID=$(id -u):$(id -g) docker-compose up'"}
|
||||
# user:
|
||||
volumes:
|
||||
- .:/ERPLibre
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM technolibre/erplibre-core:12.0
|
||||
FROM technolibre/erplibre-base:12.0
|
||||
|
||||
USER root
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM technolibre/erplibre-core:12.0
|
||||
FROM technolibre/erplibre-base:12.0
|
||||
|
||||
ENV REPO_MANIFEST_URL https://github.com/agileops/ERPLibre.git
|
||||
RUN cat /etc/os-release
|
||||
41
docker/Dockerfile.prod.src
Normal file
41
docker/Dockerfile.prod.src
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
FROM technolibre/erplibre-base:12.0
|
||||
|
||||
# TODO
|
||||
|
||||
|
||||
# ENV REPO_MANIFEST_URL https://github.com/agileops/ERPLibre.git
|
||||
# RUN cat /etc/os-release
|
||||
|
||||
# USER root
|
||||
|
||||
# # Install Odoo
|
||||
# ENV ODOO_VERSION 12.0
|
||||
# ARG ODOO_RELEASE=20200417
|
||||
# ARG ODOO_SHA=ca4a7485b0b75850ffe1458a8f3266839400a501
|
||||
# RUN curl -o odoo.deb -sSL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \
|
||||
# && echo "${ODOO_SHA} odoo.deb" | sha1sum -c - \
|
||||
# && apt-get update \
|
||||
# && apt-get -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew install --no-install-recommends ./odoo.deb \
|
||||
# && rm -rf /var/lib/apt/lists/* odoo.deb
|
||||
|
||||
|
||||
# RUN mkdir ~/.ssh/ && echo "StrictHostKeyChecking no" >> ~/.ssh/config && apt update && apt install ssh-client git -y --no-install-recommends && \
|
||||
# rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# RUN cd ; mkdir -p .bin/ && \
|
||||
# git config --global color.ui false && \
|
||||
# git config --global user.email "foo@bar.io" && \
|
||||
# git config --global user.name "Foo Bar" && \
|
||||
# mkdir -p $ODOO_PREFIX && cd $ODOO_PREFIX && \
|
||||
# repo init -u $REPO_MANIFEST_URL -b 12.0_repo && \
|
||||
# repo sync -j 4 -c
|
||||
|
||||
# ADD repo_manifest_gen_org_prefix_path.py /root/.bin/
|
||||
# RUN chmod +x ~/.bin/repo_manifest_gen_org_prefix_path.py
|
||||
|
||||
# RUN head /etc/odoo/odoo.conf && /root/.bin/repo_manifest_gen_org_prefix_path.py $ODOO_PREFIX/addons /etc/odoo/odoo.conf /etc/odoo/odoo.conf && head /etc/odoo/odoo.conf
|
||||
|
||||
# user odoo
|
||||
|
||||
# ENTRYPOINT ["/entrypoint.sh"]
|
||||
# CMD ["odoo"]
|
||||
Loading…
Reference in a new issue