-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chose the default transaction manager based on RegistryEnvironment. This makes it possible to run nomulus on Jetty locally. Tested with the following: ```bash ./gradle :jetty:run -Penvironment=alpha curl http://localhost:8080/beta.app ``` The docker image is also updated to take an argument that specifies the environment. It runs locally as well but the container doesn't get access to locally stored credentials, so it fails to initialize the transaction manager.
- Loading branch information
Showing
7 changed files
with
55 additions
and
30 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
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,7 +1,5 @@ | ||
FROM jetty:12-jdk21 | ||
ADD --chown=jetty:jetty build/jetty-base /jetty-base | ||
ENV JETTY_BASE=/jetty-base | ||
WORKDIR "$JETTY_BASE" | ||
ADD --chown=jetty:jetty start.sh / | ||
EXPOSE 8080 | ||
ENTRYPOINT ["java", "-jar", "/usr/local/jetty/start.jar"] | ||
|
||
ENTRYPOINT ["/bin/sh", "/start.sh"] |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://eclipse.dev/jetty/configure_10_0.dtd"> | ||
|
||
<Configure id="wac" class="org.eclipse.jetty.ee8.webapp.WebAppContext"> | ||
<Set name="contextPath">/</Set> | ||
<Set name="war">./webapps/nomulus.war</Set> | ||
</Configure> |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/sh | ||
# Copyright 2024 The Nomulus Authors. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
environment=$1 | ||
cd /jetty-base | ||
java -jar /usr/local/jetty/start.jar -Dgoogle.registry.environment=${environment:-"alpha"} |