Skip to content
Open
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
8 changes: 0 additions & 8 deletions celements-admin-frontend/.env.dev

This file was deleted.

13 changes: 0 additions & 13 deletions celements-admin-frontend/.env.prod

This file was deleted.

2 changes: 1 addition & 1 deletion celements-webapp/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ DB_HOST_PORT=2306
# database
DB_DRIVER=com.mysql.jdbc.Driver
DB_SCHEME=jdbc:mysql
DB_HOST=celements-db
DB_HOST=db
DB_PORT=3306
DB_USER=celements
DB_PASSWORD=celements
Expand Down
4 changes: 4 additions & 0 deletions celements-webapp/.env.tomcat
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# spring
SPRING_PROFILES_ACTIVE=${PROFILE:-local}

# xwiki
xwiki_db=${DB_MAIN}
xwiki_db_prefix=${DB_PREFIX}_
xwiki_url_port=${TOMCAT_PORT}

# hibernate
hibernate_connection_url=${DB_SCHEME}://${DB_HOST}:${DB_PORT}/${DB_PREFIX}_${DB_MAIN}?useServerPrepStmts=false&useUnicode=true&characterEncoding=UTF-8&sessionVariables=sql_mode=''&usePipelineAuth=false&disablePipeline=true
Expand Down
10 changes: 5 additions & 5 deletions celements-webapp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

## Local Development

Log in to GHCR once so Docker can pull shared images Use your GitHub username and a classic token
(https://github.com/settings/tokens) with `read:packages` scope as the password.
Log in to the forge once so Docker can pull shared images. Generate an access token
(https://forge.celhosting.ch/user/settings/applications) with `package: Read` permission.

```sh
docker login ghcr.io
docker login forge.celhosting.ch
```


Expand Down Expand Up @@ -59,5 +59,5 @@ The image is published by `Jenkinsfile.image`.

The pipeline extracts the Maven project version from `pom.xml` and publishes:

- `ghcr.io/celements/celements-webapp:<version>`
- `ghcr.io/celements/celements-webapp:<version>-<git-sha>`
- `forge.celhosting.ch/celements/celements-webapp:<version>`
- `forge.celhosting.ch/celements/celements-webapp:<version>-<git-sha>`
28 changes: 10 additions & 18 deletions celements-webapp/compose.local.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@
name: celements-web
name: ${APP_NAME}
services:

webserver:
container_name: celements-web
image: ghcr.io/synventis-infra/tomcat:release
web:
image: forge.celhosting.ch/synventis-infra/tomcat:release
ports:
- "${TOMCAT_PORT:-2080}:8080" # tomcat
- "${JPDA_PORT:-2000}:8000" # remote debugging
env_file:
- .env
- .env.tomcat
volumes:
- ./target/celements-web:/usr/local/tomcat/webapps/ROOT:ro
- web-data:${APP_DATA}:rw
- ./target/${APP_NAME}-web:/usr/local/tomcat/webapps/ROOT:ro
- ./docker/tomcat/log4j2.properties:/usr/local/tomcat/webapps/ROOT/WEB-INF/classes/log4j2.properties:ro
restart: unless-stopped
networks:
- celements
logging:
driver: journald
depends_on:
- sqlserver
- db

sqlserver:
container_name: celements-db
db:
image: mariadb:10.1
ports:
- "${DB_HOST_PORT:-2306}:3306" # for direct client access
Expand All @@ -31,17 +28,12 @@ services:
- "MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD:?}"
volumes:
- db-data:/var/lib/mysql
- ./docker/sqlserver/mysql.cnf:/etc/mysql/conf.d/mysql.cnf:ro
- ./docker/sqlserver/init:/docker-entrypoint-initdb.d:ro
- ./docker/mariadb/mysql.cnf:/etc/mysql/conf.d/mysql.cnf:ro
- ./docker/mariadb/init:/docker-entrypoint-initdb.d:ro
restart: unless-stopped
networks:
- celements
logging:
driver: journald

volumes:
web-data:
db-data:

networks:
celements:
driver: bridge
2 changes: 1 addition & 1 deletion celements-webapp/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN --mount=type=secret,id=mvnsettings,required=true,target=/root/.m2/settings.x
-Dmaven.repo.local=/root/.m2/repository \
clean prepare-package war:exploded

FROM ghcr.io/synventis-infra/tomcat:release AS execute
FROM forge.celhosting.ch/synventis-infra/tomcat:release AS execute

ARG VERSION
ARG REVISION
Expand Down
3 changes: 3 additions & 0 deletions celements-webapp/docker/tomcat/log4j2.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ appender.console.layout.pattern=%d{ISO8601} [%t] %-5p %-30.30c{2} - %m %n
rootLogger.level=warn
rootLogger.appenderRef.stdout.ref=STDOUT

logger.springEnv.name=org.springframework.web.context.support.StandardServletEnvironment
logger.springEnv.level=debug

logger.init.name=com.celements.init
logger.init.level=info

Expand Down
3 changes: 2 additions & 1 deletion celements-webapp/src/main/webapp/WEB-INF/xwiki.properties
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ core.defaultDocumentSyntax = xwiki/1.0
#-# velocity.properties = velocimacro.permissions.allow.inline.local.scope = true
#-# velocity.properties = runtime.introspector.uberspect = org.xwiki.velocity.introspection.ChainingUberspector
#-# velocity.properties = runtime.introspector.uberspect.chainClasses = org.apache.velocity.util.introspection.SecureUberspector,org.xwiki.velocity.introspection.DeprecatedCheckUberspector
#-# Securitiy Fix !!!
velocity.properties = input.encoding = UTF-8
#-# Security fix: restricts #parse and #include resources to /templates/
velocity.properties = eventhandler.include.class = com.celements.web.XWikiIncludeEventHandler
#-# fix max depth for macro recursions. Celements needs more than the default 10
velocity.properties = velocimacro.depth.max = 100
Expand Down