Skip to content

Commit

Permalink
Merge pull request #37 from camptocamp/new_nginx_base_image
Browse files Browse the repository at this point in the history
feat: new nginx base image + github workflow
  • Loading branch information
vrenaville authored Nov 28, 2024
2 parents 7e57b97 + 2fa9136 commit 078e513
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 3 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Test, build and push to github packages
on:
pull_request:
branches:
- 'master'
push:
branches:
- '*'
tags:
- '*.*.*'

jobs:
build-images:
if: ${{ github.event_name == 'push' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set ENV for branch master/main
if: ${{ github.ref == 'refs/heads/master' }}
run: echo "RELEASE_VERSION=latest" >> $GITHUB_ENV
- name: Set ENV for tags
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set ENV for specific branch
if: ${{ startsWith(github.ref, 'refs/heads/') && !endsWith(github.ref, '/master') }}
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}-${GITHUB_SHA}" >> $GITHUB_ENV
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Image Odoo Nginx
uses: docker/build-push-action@v2
with:
context: ./9.0
platforms: linux/amd64
push: true
tags: ghcr.io/${{ github.repository }}:${{ env.RELEASE_VERSION }}
5 changes: 2 additions & 3 deletions 9.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
FROM docker.io/nginx:1.25.1-bookworm
FROM docker.io/nginx:1.27.3-bookworm
MAINTAINER Camptocamp

RUN apt-get update && apt-get remove curl -y && apt-get clean && rm -rf /var/lib/apt/lists/*
ADD https://github.com/kelseyhightower/confd/releases/download/v0.11.0/confd-0.11.0-linux-amd64 /usr/local/bin/confd
RUN chmod +x /usr/local/bin/confd

RUN mkdir -p /etc/confd/{conf.d,templates}
COPY conf.d /etc/confd/conf.d
COPY templates /etc/confd/templates
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ The configuration file should work from Odoo 8.0 to 12.0 and up.
By default, nginx is configured to proxy pass on the host named "odoo".
This can be changed with the environment variable `NGX_ODOO_HOST`.

### Odoo longpolling port

By default, nginx is configured to use the default port 8072 for longpolling.
This can be changed with the environment variable `NGX_ODOO_LONGPOLLING_PORT`.


### Proxy cache size

By default, nginx is configured to proxy cahce of 10m.
Expand Down

0 comments on commit 078e513

Please sign in to comment.