Skip to content

Commit

Permalink
add docker build and github action
Browse files Browse the repository at this point in the history
  • Loading branch information
longshuicy committed Sep 19, 2024
1 parent 46edaed commit 4f1946d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
- hazard
- semantics
- space
- project
include:
- name: data
dockerfile: Dockerfile.data
Expand All @@ -86,6 +87,9 @@ jobs:
- name: space
dockerfile: Dockerfile.space
hub_project: incore/space-jetty
- name: project
dockerfile: Dockerfile.project
hub_project: incore/project-jetty

steps:
- name: Download build files
Expand Down
26 changes: 26 additions & 0 deletions Dockerfile.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM jetty:11.0.15-jre11

# Set user to root so logs store in previous location
USER root

# TODO we could compile the service here so this works standalone

# Working Directory
WORKDIR /home/incore

# Copy service war
COPY server/project-service/build/libs/project-service.war /home/incore/lib/

# Copy service context to jetty webapps
COPY docker/project.xml /var/lib/jetty/webapps/

# create data directory mounting point
RUN mkdir /home/incore/data && mkdir /home/incore/data/incore_data

# Reset WORKDIR so jetty runs correctly
WORKDIR /var/lib/jetty

ENV JETTY_PORT 8080

EXPOSE 8080
CMD ["java", "-Djava.io.tmpdir=/home/incore/", "-jar", "/usr/local/jetty/start.jar", "jetty.http.port=8888"]

0 comments on commit 4f1946d

Please sign in to comment.