-
Notifications
You must be signed in to change notification settings - Fork 139
Expand file tree
/
Copy pathDockerfile
More file actions
51 lines (39 loc) · 1.39 KB
/
Dockerfile
File metadata and controls
51 lines (39 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# =============================================================================
# Unified Airavata Server container
# =============================================================================
FROM eclipse-temurin:17-jre-jammy
RUN apt-get update && apt-get install -y \
curl \
netcat-openbsd \
&& rm -rf /var/lib/apt/lists/*
RUN groupadd -r airavata && useradd -r -g airavata -d /opt/airavata airavata
WORKDIR /opt/airavata
# Copy the unified server fat JAR
COPY airavata-server/target/airavata-server-0.21-SNAPSHOT.jar ./airavata-server.jar
# Create directories
RUN mkdir -p logs keystores
# Environment
ENV JAVA_HOME=/usr/lib/jvm/temurin-17-jre
ENV PATH="${JAVA_HOME}/bin:${PATH}"
# JVM tuning for production
ENV JAVA_OPTS="-server \
-Xms1g \
-Xmx4g \
-XX:+UseG1GC \
-XX:MaxGCPauseMillis=200 \
-XX:+HeapDumpOnOutOfMemoryError \
-XX:HeapDumpPath=/opt/airavata/logs \
-Djava.security.egd=file:/dev/./urandom \
-Dfile.encoding=UTF-8 \
-Duser.timezone=UTC"
# Health check via monitoring endpoint
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD curl -f http://localhost:9090/internal/actuator/health || exit 1
# Armeria (gRPC + REST + Docs + Actuator)
EXPOSE 9090
# Monitoring (Prometheus + health)
EXPOSE 9097
RUN chown -R airavata:airavata /opt/airavata
USER airavata
ENTRYPOINT ["java"]
CMD ["-jar", "airavata-server.jar"]