forked from apache/roller
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue927 Dockerfile now using OpenJDK (embedded Tomcat) instead of To…
…mcat image. (#928) * Issue927: Use OpenJDK-based Docker image * Cont'd work.
- Loading branch information
Showing
44 changed files
with
544 additions
and
985 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,40 @@ | ||
# Compose file reference: https://docs.docker.com/compose/compose-file/ | ||
# NOTE: Before running, make sure you created web/ssl.crt and web/ssl.key files (see web/Dockerfile for more info) | ||
version: "3" | ||
version: "3.2" | ||
services: | ||
tightblog-web: | ||
build: | ||
context: .. | ||
dockerfile: ./docker/web/Dockerfile | ||
restart: on-failure | ||
environment: | ||
# defining CATALINA_BASE so log4j2.xml log file location resolves properly | ||
CATALINA_BASE: /usr/local/tomcat | ||
SITE_ABSOLUTEURL: https://localhost/tightblog | ||
ports: | ||
# Allows for viewing Tomcat apps on host at standard port 80, http://localhost | ||
- "80:8080" | ||
# TightBlog configured in web.xml to require SSL, can view on host at https://localhost/tightblog | ||
# TightBlog configured to require SSL, uses port 8443 internally, 443 externally | ||
# (i.e., can view on host at https://localhost/tightblog) | ||
- "443:8443" | ||
links: | ||
- tightblog-db | ||
volumes: | ||
# TightBlog uses a named volume to store media images and the blog search index | ||
# Subfolders for both are configured in the web/tightblog-custom.properties file. | ||
- tightblog-data:/tightblog-data | ||
depends_on: | ||
- "tightblog-db" | ||
tightblog-db: | ||
image: postgres:9.5.4 | ||
image: postgres:latest | ||
environment: | ||
# Change credentials as desired if this is intended for production use :) | ||
POSTGRES_USER: scott | ||
POSTGRES_PASSWORD: tiger | ||
POSTGRES_DB: pgsqlTightBlog | ||
# fix for https://github.com/laradock/laradock/issues/919#issue-227105188 | ||
PGDATA: =/tmp | ||
expose: | ||
- "5432" | ||
ports: | ||
# Optional, allows one to view the PostgresQL database at port 5434 with a SQL client running on the host | ||
# Optional, allows one to view the PostgresQL database at port 5434 with a SQL client running on the host | ||
- "5434:5432" | ||
volumes: | ||
- tightblog-data:/var/lib/postgresql/data | ||
|
||
volumes: | ||
tightblog-data: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,9 @@ | ||
FROM tomcat:8.5-jre8 | ||
|
||
# Two TightBlog dependencies that are loaded into the Tomcat lib folder. | ||
ADD http://central.maven.org/maven2/org/postgresql/postgresql/42.2.4/postgresql-42.2.4.jar \ | ||
http://central.maven.org/maven2/javax/mail/javax.mail-api/1.6.1/javax.mail-api-1.6.1.jar /usr/local/tomcat/lib/ | ||
# Replacing image server.xml with one configured to use SSL. See https://hub.docker.com/r/unidata/tomcat-docker/, | ||
# "HTTP over SSL" section (although this image does not use the Unidata image). You'll need to provide | ||
# the web/ssl.crt and web/ssl.key files, see that section for an OpenSSL command that can be used. | ||
# Note self-signed certificates bring up browser warnings, getting a key from a certificate authority instead is preferred | ||
COPY ./docker/web/server.xml ./docker/web/ssl.crt ./docker/web/ssl.key /usr/local/tomcat/conf/ | ||
COPY ./docker/web/tightblog-custom.properties /usr/local/tomcat/lib/ | ||
COPY ./build/libs/tightblog*.war /usr/local/tomcat/webapps/tightblog.war | ||
|
||
CMD ["catalina.sh", "run"] | ||
FROM openjdk:10-jdk | ||
|
||
COPY docker/web/tightblog-custom.properties tightblog-custom.properties | ||
|
||
COPY docker/web/serverKeystore.jks serverKeystore.jks | ||
|
||
COPY build/libs/tightblog-*.war app.war | ||
|
||
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-Dtightblog.custom.config=tightblog-custom.properties", "-jar","/app.war"] |
Oops, something went wrong.