Update package build process, add .env template, and update to Cloudron base 5.0.0
This commit is contained in:
13
Dockerfile
13
Dockerfile
@ -1,6 +1,6 @@
|
||||
FROM cloudron/base:4.0.0
|
||||
FROM cloudron/base:5.0.0
|
||||
|
||||
# Install dependencies and OpenJDK 17
|
||||
# Install dependencies
|
||||
RUN apt-get update && \
|
||||
apt-get install -y software-properties-common && \
|
||||
add-apt-repository -y ppa:openjdk-r/ppa && \
|
||||
@ -18,7 +18,7 @@ RUN apt-get update && \
|
||||
dnsutils \
|
||||
openjdk-17-jdk
|
||||
|
||||
# Set environment variables
|
||||
# Set Elasticsearch version
|
||||
ENV ELASTIC_VERSION=8.17.3
|
||||
ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
|
||||
|
||||
@ -33,7 +33,7 @@ RUN mkdir -p /usr/share/elasticsearch && \
|
||||
mv /usr/share/elasticsearch-${ELASTIC_VERSION}/* /usr/share/elasticsearch/ && \
|
||||
rm -rf /usr/share/elasticsearch-${ELASTIC_VERSION} elasticsearch-${ELASTIC_VERSION}-linux-x86_64.tar.gz
|
||||
|
||||
# Create necessary directories for data and configuration
|
||||
# Create necessary directories
|
||||
RUN mkdir -p /app/data/{elasticsearch,logs,config,secrets,jdk/bin,run} && \
|
||||
chown -R elasticsearch:elasticsearch /app/data
|
||||
|
||||
@ -41,10 +41,13 @@ RUN mkdir -p /app/data/{elasticsearch,logs,config,secrets,jdk/bin,run} && \
|
||||
COPY elasticsearch.yml /app/elasticsearch.yml
|
||||
COPY start.sh /app/start.sh
|
||||
COPY stop.sh /app/stop.sh
|
||||
|
||||
# Set permissions
|
||||
RUN chmod +x /app/start.sh /app/stop.sh
|
||||
|
||||
# Add healthcheck
|
||||
# Health check
|
||||
HEALTHCHECK --interval=15s --timeout=10s --start-period=120s --retries=5 \
|
||||
CMD curl -fs -u elastic:$(cat /app/data/secrets/elastic_password) http://localhost:9200/_cluster/health?pretty || exit 1
|
||||
|
||||
# Command to run
|
||||
CMD ["/app/start.sh"]
|
Reference in New Issue
Block a user