Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ jobs:

deploy:
name: "Deploy: plone-intranet.kitconcept.dev"
uses: kitconcept/meta/.github/workflows/deploy.yml@main
uses: kitconcept/meta/.github/workflows/deploy.yml@scale-after
if: ${{ always() && github.event_name != 'pull_request' && github.ref == 'refs/heads/main' && !contains(needs.*.result, 'failure') }}
needs:
- config
Expand All @@ -180,6 +180,7 @@ jobs:
stack-file: "devops/stacks/demo.yml"
registry: "ghcr.io"
username: ${{ github.actor }}
scale-after: "solr_reindex=1"
secrets:
password: ${{ secrets.DEPLOY_GHCR_READ_TOKEN }}
remote-host: ${{ secrets.DEPLOY_HOST }}
Expand Down
3 changes: 2 additions & 1 deletion backend/Dockerfile.beispiele
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ LABEL maintainer="kitconcept GmbH <info@kitconcept.com>" \
ENV zope_i18n_compile_mo_files=
# Show only our distributions
ENV ALLOWED_DISTRIBUTIONS=kitconcept-intranet

# Increase Upload limit to 6MB
ENV ZOPE_FORM_MEMORY_LIMIT=6MB
# Install solr add-ons
ENV SITE_SETUP_SOLR=true

RUN <<EOT
set -e
Expand Down
1 change: 1 addition & 0 deletions backend/news/+solrdemo.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Enable solr for demo site. @davisagli
32 changes: 30 additions & 2 deletions devops/stacks/demo.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
version: '3.9'
version: "3.9"

services:

frontend:
image: ${IMAGE_NAME_PREFIX}-frontend:${IMAGE_TAG:-latest}
environment:
Expand Down Expand Up @@ -38,6 +37,9 @@ services:

backend:
image: ${IMAGE_NAME_PREFIX}-beispiele:${IMAGE_TAG:-latest}
environment:
COLLECTIVE_SOLR_HOST: solr
COLLECTIVE_SOLR_PORT: 8983
networks:
- public
deploy:
Expand Down Expand Up @@ -82,6 +84,32 @@ services:
- traefik.http.routers.rt-${STACK_PREFIX}-back-classic.service=svc-${STACK_PREFIX}-back
- traefik.http.routers.rt-${STACK_PREFIX}-back-classic.middlewares=gzip,mw-${STACK_PREFIX}-back-auth,mw-${STACK_PREFIX}-back-vhm-classic

solr:
image: ghcr.io/kitconcept/solr:latest
command:
- solr-precreate
- plone
- /plone-config
deploy:
replicas: 1
placement:
constraints:
- node.labels.type == app
- node.labels.env == production

# The solr-reindex service is scaled to 1 after a successful deployment.
solr-reindex:
image: ${IMAGE_NAME_PREFIX}-beispiele:${IMAGE_TAG:-latest}
command: "run scripts/solr_activate_and_reindex.py"
deploy:
replicas: 0
placement:
constraints:
- node.labels.type == app
- node.labels.env == production
restart_policy:
condition: none

networks:
public:
external: true
1 change: 1 addition & 0 deletions news/+solrdemo.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Enable solr for demo site. @davisagli