-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (26 loc) · 1.09 KB
/
Dockerfile
File metadata and controls
31 lines (26 loc) · 1.09 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
# Dockerfile for Ocean Current API
# Environment Variables Required:
# - SPRING_PROFILES_ACTIVE: Spring profile (prod, edge)
# - ES_HOST: Elasticsearch host
# - ES_API_KEY: Elasticsearch API key
# - REMOTE_BASE_URL: Remote Server base URL
# - AWS_REGION: AWS region
# - DATA_BUCKET: AWS S3 bucket name
# - AUTHORISED_INSTANCE_IDS: Comma-separated EC2 instance IDs (e.g., "i-xxx,i-yyy")
# - ES_SKIP_PRODUCT_ID_CHECK: Skip product ID check during reindex validation (default: false)
FROM amazoncorretto:17
WORKDIR /app
COPY ./build/libs/ocean-current-*-SNAPSHOT.jar /app/app.jar
EXPOSE 8080
ENTRYPOINT [\
"java",\
"-Dspring.profiles.active=${SPRING_PROFILES_ACTIVE}", \
"-Delasticsearch.host=${ES_HOST}",\
"-Delasticsearch.apiKey=${ES_API_KEY}",\
"-Delasticsearch.reindex-validation-skip-product-id-check=${ES_SKIP_PRODUCT_ID_CHECK}",\
"-Dremote.baseUrl=${REMOTE_BASE_URL}",\
"-Daws.region=${AWS_REGION}",\
"-Daws.s3.bucket-name=${DATA_BUCKET}",\
"-Dapp.monitoring-security.authorised-instance-ids=${AUTHORISED_INSTANCE_IDS}",\
"-jar",\
"/app/app.jar"]