Skip to content

Commit

Permalink
Merge pull request #5 from RedTurtle/docker_compose_dev
Browse files Browse the repository at this point in the history
Docker compose + buildout dev + plone upgrade
  • Loading branch information
cekk authored Dec 13, 2022
2 parents f880858 + afd164d commit aec4dfc
Show file tree
Hide file tree
Showing 11 changed files with 121 additions and 19 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Generate constraints.txt from constraint.cfg
run: |
cd docker
make constraints.txt
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

Expand Down Expand Up @@ -56,7 +51,7 @@ jobs:
- name: Build and push container image
uses: docker/build-push-action@v3
with:
context: ./docker
context: .
push: true
tags: ${{ steps.get_image_id.outputs.IMAGE_ID }}:${{ steps.get_version.outputs.VERSION }}
platforms: linux/amd64,linux/arm64
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.installed.cfg
.mr.developer.cfg
pyvenv.cfg
/bin
/develop-eggs
/lib
/lib64
/parts
/var
/src/*
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM plone/plone-backend:5.2.10
COPY docker/create-constraints.py docker/constraints.cfg docker/requirements.txt /app/
COPY versions.cfg /
RUN pip install -r https://dist.plone.org/release/5.2.10/requirements.txt ${PIP_PARAMS} && \
python create-constraints.py constraints.cfg constraints.txt && \
./bin/pip install --ignore-requires-python -r requirements.txt -c constraints.txt ${PIP_PARAMS} && \
find /app/lib -name LC_MESSAGES -exec chown -R plone:plone {} \;
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,20 @@ extends =
https://raw.githubusercontent.com/RedTurtle/dist.design.plone/main/versions.cfg
```

E' possibile eventualmente anche usare il buildout.cfg presente in questo repository

```bash
python3.8 -m venv .
bin/pip install -r requirements.txt
bin/buildout
```

O il docker compose::

```bash
docker compose build
docker compose up
```

## Produzione

Expand All @@ -32,6 +45,12 @@ extends =
https://raw.githubusercontent.com/RedTurtle/dist.design.plone/20211126-01/versions.cfg
```

# Docker images

Dal branch __main__ e dai tag vengono create automaticamente immagini Docker linux/amd64 e linux/arm64 rilasciate sul repository gihub

https://github.com/RedTurtle/dist.design.plone/pkgs/container/dist.design.plone

# Quando fare un nuovo tag

Quando si devono fare degli aggiornamenti in produzione, e tutto è pronto e testato, allora si può fare un nuovo tag per fissarle.
Expand Down
40 changes: 40 additions & 0 deletions buildout.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

#
# THIS IS FOR DEVELOPMENT, DO NOT USE AS IS IN PRODUCTION
#

[buildout]
# https://raw.github.com/collective/buildout.plonetest/master/test-5.2.x.cfg
# https://raw.githubusercontent.com/collective/buildout.plonetest/master/qa.cfg
extends =
https://raw.githubusercontent.com/plone/buildout.coredev/5.2.10/buildout.cfg
versions.cfg
parts +=
site
omelette

[instance]
eggs +=
design.plone.policy
collective.upgrade

[site]
recipe = collective.recipe.plonesite
site-id = Plone
default-language = it
profiles-initial =
plone.app.caching:default
design.plone.policy:default
upgrade-portal = true
upgrade-all-profiles = true

[omelette]
recipe = collective.recipe.omelette
eggs = ${instance:eggs}

[sources]
redturtle.volto = git https://github.com/redturtle/redturtle.volto pushurl[email protected]:redturtle/redturtle.volto

[versions]
collective.recipe.plonesite = 1.12.0
collective.upgrade = 1.7
18 changes: 18 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: '3'

services:
backend:
build: .
ports:
- "8080:8080"
environment:
- SITE=Plone
- PROFILES=design.plone.policy:default
# TODO: improve this part
# i.e. develop redturtle.volto withd docker
# 1. run something like "cd src && git clone [email protected]:redturtle/redturtle.volto"
# 2. uncomment the line beloow
# - DEVELOP=/app/src/redturtle.volto
volumes:
- ./src:/app/src

4 changes: 0 additions & 4 deletions docker/Dockerfile

This file was deleted.

1 change: 0 additions & 1 deletion docker/constraints.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# https://github.com/plone/buildout.coredev/blob/6.0/release/create-constraints.py
[buildout]
extends =
https://dist.plone.org/release/5.2.9/versions.cfg
../versions.cfg

[versions]
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-r https://dist.plone.org/release/5.2.10/requirements.txt
Empty file added src/.gitkeep
Empty file.
33 changes: 25 additions & 8 deletions versions.cfg
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
[versions]
[buildout]
extends =
https://dist.plone.org/release/5.2.10/versions.cfg

[versions]
# agid-related products
collective.address = 1.6
collective.dexteritytextindexer = 2.4.0
collective.geolocationbehavior = 1.7.1
collective.honeypot = 2.1
collective.sentry = 0.2.4
collective.purgebyid = 1.2.0
collective.sentry = 0.3.0
collective.tiles.collection = 2.0.0
collective.venue = 4.1
collective.volto.blocksfield = 1.0.3
Expand All @@ -28,8 +32,17 @@ redturtle.rssservice = 2.0.0
redturtle.volto = 4.1.0
redturtle.voltoplugin.editablefooter = 1.1.1
rer.customersatisfaction = 2.0.0
# TODO: check withs sentry-sdk >= 1
sentry-sdk = 0.19.5

# souper
souper.plone = 1.3.1
souper = 1.1.1
repoze.catalog = 0.9.0
zope.index = 5.2.1
node.ext.zodb = 1.3
plumber = 1.7

# ldap
node = 1.1
node.ext.ldap = 1.1
Expand All @@ -38,17 +51,21 @@ pas.plugins.ldap = 1.8.2
node.ext.ugm = 1.0

# plone products (maybe need to be removed when upgrading plone versions)
plone.app.caching = 3.0.0a10
plone.app.iterate = 4.0.2
plone.app.versioningbehavior = 1.4.6
plone.app.vocabularies = 4.3.0
plone.patternslib = 1.1.1
plone.rest = 2.0.0a5
plone.restapi = 8.24.1
plone.volto = 4.0.0a8
Products.PloneHotfix20200121 = 1.1
plone.rest = 2.0.0
plone.restapi = 8.32.4
plone.volto = 4.0.0
pycountry = 19.8.18
plone.staticresources = 1.4.6
# image_scales backports
plone.app.imaging = 2.1.2
plone.scale = 4.0.0
plone.namedfile = 6.0.0
plone.app.uuid = 2.2.1
# plone.app.caching > 3.0.0a13 requires plone.base
plone.app.caching = 3.0.0a13

# do not fix these
setuptools=
Expand Down

0 comments on commit aec4dfc

Please sign in to comment.