Skip to content

Commit

Permalink
Create Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
tsubramanian authored Sep 15, 2024
1 parent 803aea2 commit d126f8a
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions devops/deploy/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Use the base Tomcat image
FROM tomcat:9.0.85-jre8-temurin-jammy

# Set environment variables
ENV DB_USER=${WILDBOOK_DB_USER}
ENV DB_PASSWORD=${WILDBOOK_DB_PASSWORD}
ENV DB_CONNECTION_URL=${WILDBOOK_DB_CONNECTION_URL}
ENV ADMIN_EMAIL=${EDM_AUTHENTICATIONS_USERNAME__DEFAULT}
ENV ADMIN_PASSWORD=${EDM_AUTHENTICATIONS_PASSWORD__DEFAULT}
ENV SERVER_URL=${SERVER_URL}
ENV JAVA_OPTS="-Djava.awt.headless=true -Xms4096m -Xmx4096m"

# Copy configuration files into the image
COPY .dockerfiles/docker-entrypoint.sh /docker-entrypoint.sh
COPY .dockerfiles/tomcat/server.xml /usr/local/tomcat/conf/server.xml
COPY .dockerfiles/tomcat/watermark.png /usr/local/tomcat/watermark.png
COPY .dockerfiles/tomcat/IA.json /usr/local/tomcat/webapps/wildbook_data_dir/WEB-INF/classes/bundles/IA.json
COPY .dockerfiles/tomcat/IA.properties /usr/local/tomcat/webapps/wildbook_data_dir/WEB-INF/classes/bundles/IA.properties
COPY .dockerfiles/tomcat/commonConfiguration.properties /usr/local/tomcat/webapps/wildbook_data_dir/WEB-INF/classes/bundles/commonConfiguration.properties

# Set the entrypoint script
ENTRYPOINT ["/docker-entrypoint.sh"]

# Expose the port on which Tomcat will run
EXPOSE 8080

# Default command (inherited from base image)
CMD ["catalina.sh", "run"]

0 comments on commit d126f8a

Please sign in to comment.