Skip to content

Commit

Permalink
Merge branch 'lc-develop' into lc-release-1.3.0 to include the test e…
Browse files Browse the repository at this point in the history
…mail feature to be shipped with LC1.3
  • Loading branch information
oba-reliatec committed May 15, 2024
2 parents 4bf8c29 + 9fa99b4 commit 2a99661
Show file tree
Hide file tree
Showing 15 changed files with 957 additions and 33 deletions.
18 changes: 18 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# ignore everything
*

# include config files
!/docker/config

# include maven file
!/pom.xml

# include modules
!/core
!/docs
!/odm
!/web
!/ws

# ignore build files
/*/target
43 changes: 43 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
FROM docker.io/library/maven:3-eclipse-temurin-8 AS builder

WORKDIR /app

COPY . .

RUN \
# cache downloaded dependencies
--mount=type=cache,target=/root/.m2 \
# build cache
--mount=type=cache,target=/app/core/target \
--mount=type=cache,target=/app/docs/target \
--mount=type=cache,target=/app/odm/target \
--mount=type=cache,target=/app/web/target \
--mount=type=cache,target=/app/ws/target \

set -eux; \
mvn package; \
mv web/target/LibreClinica-web.war /;

############################################################
FROM tomcat:9-jdk11

RUN set -eux; \
# set up redirection to application when accessing tomcat root
mkdir /usr/local/tomcat/webapps/ROOT; \
echo '<html><head><meta http-equiv="refresh" content="0; URL=LibreClinica/" /></head></html>' \
> /usr/local/tomcat/webapps/ROOT/index.html;

# set up volumes for data and logs
VOLUME \
/usr/local/tomcat/libreclinica.data \
/usr/local/tomcat/logs

# add config files
COPY \
/docker/config/ \
/usr/local/tomcat/libreclinica.config/

# add libre-clinica war file
COPY --from=builder \
/LibreClinica-web.war \
/usr/local/tomcat/webapps/LibreClinica.war
38 changes: 38 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
services:
libreclinica:
build: .
ports:
- "127.0.0.1:8080:8080"
depends_on:
- db
develop:
watch:
# restart on config file changes
- action: sync+restart
path: ./docker/config
target: /usr/local/tomcat/libreclinica.config

# rebuild on source file changes
- action: rebuild
path: ./core

- action: rebuild
path: ./odm

- action: rebuild
path: ./web

- action: rebuild
path: ./ws

db:
image: docker.io/library/postgres:14-alpine
environment:
POSTGRES_PASSWORD: clinica
POSTGRES_USER: clinica
POSTGRES_DB: libreclinica

smtp:
image: docker.io/marlonb/mailcrab:v1.1.0
ports:
- "127.0.0.1:1080:1080"
Loading

0 comments on commit 2a99661

Please sign in to comment.