diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b353d38..8ebf182 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4ae3da2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/src/* diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0cdb80a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM plone/plone-backend:5.2.9 +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.9/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 {} \; diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..66dc9d7 --- /dev/null +++ b/docker-compose.yml @@ -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 git@github.com:redturtle/redturtle.volto" + # 2. uncomment the line beloow + # - DEVELOP=/app/src/redturtle.volto + volumes: + - ./src:/app/src + diff --git a/docker/Dockerfile b/docker/Dockerfile deleted file mode 100644 index da1c694..0000000 --- a/docker/Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -FROM plone/plone-backend:5.2.9 -COPY constraints.txt requirements.txt /app/ -RUN ./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 {} \; diff --git a/src/.gitkeep b/src/.gitkeep new file mode 100644 index 0000000..e69de29