Skip to content

Commit 078e513

Browse files
authored
Merge pull request #37 from camptocamp/new_nginx_base_image
feat: new nginx base image + github workflow
2 parents 7e57b97 + 2fa9136 commit 078e513

File tree

3 files changed

+47
-3
lines changed

3 files changed

+47
-3
lines changed

Diff for: .github/workflows/workflow.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Test, build and push to github packages
2+
on:
3+
pull_request:
4+
branches:
5+
- 'master'
6+
push:
7+
branches:
8+
- '*'
9+
tags:
10+
- '*.*.*'
11+
12+
jobs:
13+
build-images:
14+
if: ${{ github.event_name == 'push' }}
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Set ENV for branch master/main
19+
if: ${{ github.ref == 'refs/heads/master' }}
20+
run: echo "RELEASE_VERSION=latest" >> $GITHUB_ENV
21+
- name: Set ENV for tags
22+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
23+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
24+
- name: Set ENV for specific branch
25+
if: ${{ startsWith(github.ref, 'refs/heads/') && !endsWith(github.ref, '/master') }}
26+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}-${GITHUB_SHA}" >> $GITHUB_ENV
27+
- name: Login to GHCR
28+
uses: docker/login-action@v3
29+
with:
30+
registry: ghcr.io
31+
username: ${{ github.repository_owner }}
32+
password: ${{ secrets.GITHUB_TOKEN }}
33+
- name: Build Image Odoo Nginx
34+
uses: docker/build-push-action@v2
35+
with:
36+
context: ./9.0
37+
platforms: linux/amd64
38+
push: true
39+
tags: ghcr.io/${{ github.repository }}:${{ env.RELEASE_VERSION }}

Diff for: 9.0/Dockerfile

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
FROM docker.io/nginx:1.25.1-bookworm
1+
FROM docker.io/nginx:1.27.3-bookworm
22
MAINTAINER Camptocamp
3-
3+
RUN apt-get update && apt-get remove curl -y && apt-get clean && rm -rf /var/lib/apt/lists/*
44
ADD https://github.com/kelseyhightower/confd/releases/download/v0.11.0/confd-0.11.0-linux-amd64 /usr/local/bin/confd
55
RUN chmod +x /usr/local/bin/confd
6-
76
RUN mkdir -p /etc/confd/{conf.d,templates}
87
COPY conf.d /etc/confd/conf.d
98
COPY templates /etc/confd/templates

Diff for: README.md

+6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ The configuration file should work from Odoo 8.0 to 12.0 and up.
1111
By default, nginx is configured to proxy pass on the host named "odoo".
1212
This can be changed with the environment variable `NGX_ODOO_HOST`.
1313

14+
### Odoo longpolling port
15+
16+
By default, nginx is configured to use the default port 8072 for longpolling.
17+
This can be changed with the environment variable `NGX_ODOO_LONGPOLLING_PORT`.
18+
19+
1420
### Proxy cache size
1521

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

0 commit comments

Comments
 (0)