-
Notifications
You must be signed in to change notification settings - Fork 7
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
OZ-718: Combine SENAITE docker images in one repo #19
Merged
Merged
Changes from 2 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
be9f963
Combine SENAITE docker images in one repo
VaishSiddharth 3ba9422
Fix workflows
VaishSiddharth 5390e8b
Use shared github-workflow
VaishSiddharth d936578
Merge build files
VaishSiddharth e4eafb8
Fix
VaishSiddharth 4d84464
Fix+
VaishSiddharth ab0575d
Remove redundant statement in build.yml
VaishSiddharth 01bcd00
Fix directory names
VaishSiddharth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ name: CI | |
|
||
on: | ||
push: | ||
paths: | ||
- 'senaite-without-sso/**' | ||
branches: [main] | ||
release: | ||
types: [published] | ||
|
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,49 @@ | ||
name: CI SSO | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'senaite-with-sso/**' | ||
branches: [ main ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- | ||
name: Login to DockerHub | ||
if: github.ref == 'refs/heads/main' | ||
uses: docker/login-action@v2 | ||
with: | ||
username: mekomsolutions | ||
password: ${{ secrets.DOCKER_HUB_REGISTRY_PASSWORD }} | ||
- | ||
name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
|
||
with: | ||
images: | | ||
mekomsolutions/senaite-ozonepro | ||
VaishSiddharth marked this conversation as resolved.
Show resolved
Hide resolved
|
||
tags: | | ||
type=raw,value=latest,enable={{is_default_branch}} | ||
type=pep440,pattern={{version}} | ||
type=pep440,pattern={{major}}.{{minor}} | ||
type=sha | ||
- | ||
name: Build and push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
VaishSiddharth marked this conversation as resolved.
Show resolved
Hide resolved
|
||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} |
File renamed without changes.
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 @@ | ||
FROM mekomsolutions/senaite | ||
|
||
# Copy Buildout | ||
COPY requirements.txt buildout.cfg develop.cfg $SENAITE_INSTANCE_HOME/ | ||
|
||
# Copy the build dependencies and startup scripts | ||
COPY build_deps.txt run_deps.txt / | ||
|
||
# Install moreutils and gettext | ||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends moreutils gettext \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Note: we concatenate all commands to avoid multiple layer generation and reduce the image size | ||
RUN apt-get update \ | ||
# Install system packages | ||
&& apt-get install -y --no-install-recommends $(grep -vE "^\s*#" /build_deps.txt | tr "\n" " ") \ | ||
&& apt-get install -y --no-install-recommends $(grep -vE "^\s*#" /run_deps.txt | tr "\n" " ") \ | ||
&& git clone https://github.com/mekomsolutions/ftw.oidcauth.git $SENAITE_INSTANCE_HOME/src/ftw.oidcauth \ | ||
&& cd $SENAITE_INSTANCE_HOME/src/ftw.oidcauth && git checkout custom \ | ||
# Buildout | ||
&& cd $SENAITE_INSTANCE_HOME \ | ||
&& pip install -r requirements.txt \ | ||
&& buildout \ | ||
&& ln -s $SENAITE_FILESTORAGE/ var/filestorage \ | ||
&& ln -s $SENAITE_BLOBSTORAGE/ var/blobstorage \ | ||
&& chown -R senaite:senaite $SENAITE_HOME $SENAITE_DATA \ | ||
# Cleanup | ||
&& apt-get purge -y --auto-remove $(grep -vE "^\s*#" /build_deps.txt | tr "\n" " ") \ | ||
&& rm -rf /$SENAITE_HOME/buildout-cache \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
COPY docker-initialize.py docker-entrypoint.sh / | ||
|
||
# Change working directory | ||
WORKDIR $SENAITE_INSTANCE_HOME | ||
|
||
# Mount external volume | ||
VOLUME /data | ||
|
||
# Expose instance port | ||
EXPOSE 8080 | ||
|
||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
CMD ["start"] |
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,18 @@ | ||
dpkg-dev | ||
gcc | ||
g++ | ||
libpq-dev | ||
python-dev | ||
libbz2-dev | ||
libc6-dev | ||
libffi-dev | ||
libjpeg62-turbo-dev | ||
libopenjp2-7-dev | ||
libpcre3-dev | ||
libssl-dev | ||
libtiff5-dev | ||
libxml2-dev | ||
libxslt1-dev | ||
wget | ||
zlib1g-dev | ||
git |
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,101 @@ | ||
[buildout] | ||
index = https://pypi.python.org/simple/ | ||
extends = | ||
buildout-base.cfg | ||
extensions = mr.developer | ||
|
||
var-dir=/data | ||
user=admin:admin | ||
|
||
effective-user = senaite | ||
buildout-user = senaite | ||
|
||
eggs-directory=eggs | ||
download-cache=../buildout-cache/downloads | ||
|
||
parts += | ||
zeo | ||
plonesite | ||
console_scripts | ||
cron-pack | ||
|
||
eggs += | ||
senaite.lims | ||
ftw.oidcauth | ||
plone.initializer | ||
senaite.indexer | ||
senaite.monkeypatches | ||
RelStorage | ||
pg8000 | ||
|
||
############################################ | ||
# Development Eggs | ||
# ---------------- | ||
# You can use paster to create "development eggs" to | ||
# develop new products/themes. Put these in the src/ | ||
# directory. | ||
# You will also need to add the egg names in the | ||
# eggs section above, and may also need to add them | ||
# to the zcml section. | ||
# | ||
# Provide the *paths* to the eggs you are developing here: | ||
develop = | ||
src/plone.initializer | ||
src/ftw.oidcauth | ||
src/senaite.indexer | ||
src/senaite.monkeypatches | ||
|
||
[client1] | ||
recipe = | ||
|
||
[zeo] | ||
<= zeoserver_base | ||
recipe = plone.recipe.zeoserver | ||
zeo-address = 8080 | ||
pack-days = 0 | ||
pack-keep-old = false | ||
|
||
[cron-pack] | ||
recipe = z3c.recipe.usercrontab | ||
times = 0 0 * * * | ||
command = ${buildout:bin-directory}/zeopack | ||
|
||
[instance] | ||
# taken from https://github.com/plone/plone.docker/blob/master/5.2/5.2.5/python2/buildout.cfg | ||
event-log-handler = StreamHandler | ||
event-log-args = (sys.stderr,) | ||
access-log-handler = StreamHandler | ||
access-log-args = (sys.stdout,) | ||
z2-log-level = ERROR | ||
event-log-max-size = 5 MB | ||
event-log-old-files = 5 | ||
access-log-max-size = 20 MB | ||
access-log-old-files = 10 | ||
|
||
[console_scripts] | ||
recipe = zc.recipe.egg:scripts | ||
eggs = senaite.core | ||
|
||
[plonesite] | ||
recipe = collective.recipe.plonesite | ||
instance = instance | ||
site-id = senaite | ||
profiles-initial = Products.CMFPlone:dependencies | ||
profiles = | ||
senaite.lims:default | ||
plone.initializer:default | ||
ftw.oidcauth:default | ||
senaite.indexer:default | ||
upgrade-portal = False | ||
upgrade-all-profiles = False | ||
enabled = False | ||
|
||
[versions] | ||
setuptools = | ||
zc.buildout = | ||
senaite.core = 2.5.0 | ||
senaite.lims = 2.5.0 | ||
RelStorage = 2.1.1 | ||
pg8000 = 1.12.5 | ||
perfmetrics = 3.3.0 | ||
et-xmlfile = 1.1.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,165 @@ | ||
################################################################# | ||
# | ||
# Development Configuration | ||
# ========================= | ||
# | ||
# This is a buildout configuration that sets up a development | ||
# environment for Plone. It extends buildout.cfg. | ||
# | ||
# To use this configuration, run buildout via: | ||
# | ||
# bin/buildout -c develop.cfg | ||
# | ||
# This specifies develop.cfg as buildout's configuration file. This configuration | ||
# file extends buildout.cfg, so that all the options from that file are | ||
# automatically included. | ||
# | ||
# Included in the development configuration | ||
# | ||
# Common development tools: | ||
# | ||
# * mr.bob, a Python package-skeleton generator. With bobtemplates.plone | ||
# it has supportfor common Plone development packages like content-type | ||
# and theme packages. | ||
# | ||
# * mr.developer, a tool that automatically checks out source for | ||
# add ons from a versioning system, then adds them to your | ||
# development package list. | ||
# | ||
# * testrunner, which provides a command-line option to run | ||
# test suites. | ||
# | ||
# * Diazo command-line tools: diazocompile and diazorun. Useful | ||
# for debugging and understanding Diazo and plone.app.theming. | ||
# See http://docs.diazo.org/en/latest/compiler.html | ||
# | ||
# * collective.checkdocs adds new distutils commands checkdocs and | ||
# showdocs to validate restructured text in long_description | ||
# field of Python eggs. | ||
# | ||
# * zest.releaser, a kit for managing the release cycle for Python | ||
# packages. See https://pypi.python.org/pypi/zest.releaser. | ||
# | ||
# Common Customizations | ||
# ===================== | ||
# | ||
# Add packages to the sources managed by mr.developer by adding them to the | ||
# [sources] section below. | ||
# | ||
# Add packages to the test suite by adding them to the "test-packages" option | ||
# in the [buildout] section below. | ||
|
||
|
||
############################################ | ||
# Sources | ||
# ------- | ||
# Specify packages under development here. | ||
# | ||
# See http://pypi.python.org/pypi/mr.developer for mr.developer source specifications. | ||
# <name> = <kind> [key=value] <url> [path] [key=value] | ||
# kind = The kind of repository. Currently supported are one of svn (>= 1.5), hg, git, cvs or fs. | ||
# | ||
[sources] | ||
# Examples: to check out plonetheme.sunburst from Plone's svn, use: | ||
# plonetheme.sunburst = svn https://svn.plone.org/svn/plone/plonetheme.sunburst/trunk | ||
# | ||
# To use a python package that is being developed in your src subdirectory, use: | ||
# myproduct.betterplone = fs myproduct.betterplone | ||
|
||
|
||
[buildout] | ||
|
||
############################################ | ||
# Test Packages | ||
# ---------- | ||
# Specify a list of packages that you wish to explicity include in your test suite. | ||
# Base eggs are automatically included | ||
# | ||
test-packages = | ||
# plonetheme.sunburst | ||
|
||
|
||
############################################ | ||
# Debug Mode | ||
# ---------- | ||
# Most development work is done with Zope/Plone started | ||
# in foreground mode (bin/plonectl fg), which automatically | ||
# turns on debug mode and causes Zope/Plone to stop on | ||
# package loading errors. | ||
# | ||
# Note that debug mode makes Plone run *very* slowly due to | ||
# extra filesystem checks and granular transmission of browser resources. | ||
# | ||
# If you're developing Plone add-ons, you should want to see | ||
# deprecation warnings that let you know if you're using outmoded | ||
# methods or modules. | ||
deprecation-warnings = on | ||
# | ||
# Turning on verbose security may help diagnose security bugs. | ||
# You'll also need to disable the intercepting of "unauthorized" | ||
# errors in the error_log via the ZMI. | ||
verbose-security = off | ||
|
||
|
||
############################################ | ||
# Less Commonly Changed Options | ||
# ----------------------------- | ||
# The remainder of the buildout mainly sets up the development | ||
# environment based on the settings above. | ||
|
||
# we're extending buildout.cfg | ||
extends = | ||
buildout.cfg | ||
|
||
extensions += | ||
mr.developer | ||
|
||
|
||
# mr.developer settings: | ||
always-checkout = force | ||
sources = sources | ||
auto-checkout = * | ||
|
||
|
||
[test] | ||
recipe = collective.xmltestreport | ||
defaults = ['--auto-color', '--auto-progress', '--ignore_dir=.git', '--ignore_dir=bower_components', '--ignore_dir=node_modules'] | ||
eggs = | ||
${buildout:eggs} | ||
${buildout:test-packages} | ||
|
||
|
||
# Add diazo compile/run tools to bin; useful for debugging understanding | ||
# diazo. See http://docs.diazo.org/en/latest/compiler.html | ||
[diazotools] | ||
recipe = zc.recipe.egg | ||
eggs = diazo | ||
|
||
|
||
[checkdocs] | ||
# installs collective.checkdocs from pypi [https://github.com/collective/collective.checkdocs] | ||
recipe = zc.recipe.egg | ||
eggs = | ||
collective.checkdocs | ||
|
||
|
||
# [mrbob] | ||
# recipe = zc.recipe.egg | ||
# eggs = | ||
# mr.bob | ||
|
||
|
||
[releaser] | ||
# installs zest.releaser, po compiler | ||
recipe = zc.recipe.egg | ||
eggs = | ||
zest.releaser | ||
zest.pocompile | ||
|
||
[i18ndude] | ||
recipe = zc.recipe.egg | ||
eggs = i18ndude | ||
|
||
[plonecli] | ||
recipe = zc.recipe.egg | ||
eggs = plonecli |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can have one GA workflow file with two jobs. Also, let's utilize shared workflows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/mekomsolutions/shared-github-workflow/blob/main/docs/docker-build-publish.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Please can you have a look at the
build.yml
file and see if all the configuration are okaycc: @corneliouzbett @enyachoke