Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

17.0 #5

Open
wants to merge 18 commits into
base: 15.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 33 additions & 21 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,45 @@

name: Docker Image CI
name: Build and Push Docker Image to Docker Hub

on:
schedule:
- cron: '30 5 10,20 * *'
push:
branches: [ 15.0 ]
workflow_dispatch:
branches: [ "17.0" ]
pull_request:
branches: [ "17.0" ]

jobs:
env:
# Use docker.io for Docker Hub if empty
REGISTRY: docker.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}

build:
jobs:

push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest

steps:
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
- name: Check out the repo
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
id: docker_build
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: "{{defaultContext}}"
push: true
tags: trustcode/docker-odoo-base:15.0
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
36 changes: 14 additions & 22 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

ENV DEBIAN_FRONTEND noninteractive
ENV TERM=xterm
Expand All @@ -7,41 +7,37 @@ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d

##### Dependências #####

RUN apt-get update
RUN apt update && apt install gnupg2 wget curl -y

ADD conf/apt-requirements /opt/sources/
ADD conf/pip-requirements /opt/sources/

RUN echo "deb http://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list
RUN curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg
RUN apt update && apt install postgresql-client-16 -y

WORKDIR /opt/sources/
RUN apt-get install -y --no-install-recommends $(grep -v '^#' apt-requirements)

RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash - && \
apt-get install -y nodejs && \
curl -L https://www.npmjs.com/install.sh | sh && \
npm install -g less && npm cache clean --force
RUN apt-get clean && apt-get update && apt-get install -y locales

RUN locale-gen en_US en_US.UTF-8 pt_BR pt_BR.UTF-8 && \
dpkg-reconfigure locales

ENV LC_ALL pt_BR.UTF-8

ADD conf/brasil-requirements /opt/sources/
RUN pip3 install setuptools && pip3 install --no-cache-dir --upgrade pip
RUN pip3 install --no-cache-dir -r pip-requirements && \
pip3 install --no-cache-dir -r brasil-requirements

ADD https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb /opt/sources/wkhtmltox.deb
RUN dpkg -i wkhtmltox.deb && rm wkhtmltox.deb
RUN wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
RUN dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb

RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ bionic"-pgdg main | tee /etc/apt/sources.list.d/pgdg.list
RUN apt-get update && apt-get install -y postgresql-client-11
ADD https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb /opt/sources/wkhtmltox.deb
RUN dpkg -i wkhtmltox.deb && rm wkhtmltox.deb

RUN mkdir /opt/odoo/
WORKDIR /opt/odoo/
RUN mkdir private

##### Configurações Odoo #####
##### Configurações Odoo #####

ADD conf/supervisord.conf /etc/supervisor/supervisord.conf

Expand All @@ -58,11 +54,7 @@ RUN mkdir /var/log/odoo && \
chown -R odoo:odoo /var/log/odoo && \
chown odoo:odoo /var/run/odoo.pid

##### Limpeza da Instalação #####

RUN apt-get autoremove -y && \
apt-get autoclean

##### Finalização do Container #####
##### Finalização do Container #####

WORKDIR /opt/odoo

2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
# docker-odoo-base

[![Docker Repository on Quay](https://quay.io/repository/danimaribeiro/docker-odoo-base/status "Docker Repository on Quay")](https://quay.io/repository/danimaribeiro/docker-odoo-base)
114 changes: 69 additions & 45 deletions conf/apt-requirements
Original file line number Diff line number Diff line change
@@ -1,48 +1,72 @@
##### Dependências Odoo #####
libxml2-dev
libxslt1-dev
libevent-dev
libsasl2-dev
libldap2-dev
libpq-dev
libjpeg-dev
libtiff5-dev
libjpeg8-dev
libopenjp2-7-dev
zlib1g-dev
libfreetype6-dev
liblcms2-dev
libwebp-dev
libharfbuzz-dev
libfribidi-dev
libxcb1-dev

# Ferramentas
gcc
g++
python3-pip
adduser
dh-python
packaging-dev
fonts-dejavu-core
fonts-freefont-ttf
fonts-freefont-otf
fonts-noto-core
fonts-inconsolata
fonts-font-awesome
fonts-roboto-unhinted
gsfonts
libjs-underscore
lsb-base
python3-dev
locales
supervisor
curl
unzip
git
python3-gevent
python3-serial
python3-setuptools
python3-usb
python3-babel
python3-chardet
python3-dateutil
python3-decorator
python3-docutils
python3-freezegun
python3-geoip2
python3-pil
python3-jinja2
python3-libsass
python3-lxml
python3-num2words
python3-ofxparse
python3-passlib
python3-polib
python3-psutil
python3-psycopg2
python3-pydot
python3-openssl
python3-pypdf2
python3-rjsmin
python3-qrcode
python3-renderpm
python3-reportlab
python3-requests
python3-stdnum
python3-tz
python3-vobject
python3-werkzeug
python3-xlsxwriter
python3-xlrd
python3-zeep
python3-pip
xfonts-75dpi
xfonts-base
wget
gettext-base
openssh-client
postgresql-client

##### Dependências da Localização Brasileira #####
libssl-dev
gnupg2
build-essential
libldap2-dev
libsasl2-dev
slapd
ldap-utils
tox
lcov
valgrind
zip
unzip
pkg-config
libxml2-dev
libxmlsec1-dev
python-openssl
python-cffi


##### Dependências do WKHTMLTOX #####
fontconfig
libx11-6
libxext6
libxrender1
xfonts-base
xfonts-75dpi
libxmlsec1-openssl
gettext-base
supervisor
rsync
15 changes: 0 additions & 15 deletions conf/brasil-requirements

This file was deleted.

50 changes: 0 additions & 50 deletions conf/pip-requirements

This file was deleted.

2 changes: 1 addition & 1 deletion conf/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ loglevel=error ; info, debug, warn, trace
file=/tmp/supervisor.sock ; (the path to the socket file)

[program:odoo]
command=/usr/bin/odoo-server --config=/etc/odoo/odoo.conf --db_host=%(ENV_PG_HOST)s --db_port=%(ENV_PG_PORT)s --db_user=%(ENV_PG_USER)s --db_password=%(ENV_PG_PASSWORD)s --xmlrpc-port=%(ENV_PORT)s --longpolling-port=%(ENV_LONGPOLLING_PORT)s --workers=%(ENV_WORKERS)s
command=/usr/bin/odoo-server --config=/etc/odoo/odoo.conf --db_host=%(ENV_PG_HOST)s --db_port=%(ENV_PG_PORT)s --db_user=%(ENV_PG_USER)s --db_password=%(ENV_PG_PASSWORD)s --xmlrpc-port=%(ENV_PORT)s --gevent-port=%(ENV_GEVENT_PORT)s --workers=%(ENV_WORKERS)s %(ENV_EXTRA_ARGS)s
stdout_logfile=/var/log/odoo/odoo.log
user=odoo
autorestart=true
Expand Down