Skip to content

Commit 8efec2a

Browse files
authored
Update v1.1.0 (#122)
Features - Expose port 8000 on docker - Enable http2 on production - Define default port to 8000 on production - Define INFO as default root logging on production Changes - Revert commit 3d9346e Fixes - Fix wrong build-website script - Fix wrong project name on release action - Fix wrong on push tag configuration on release action - Fix TestContainers running after tests
1 parent 291d2dd commit 8efec2a

5 files changed

Lines changed: 13 additions & 9 deletions

File tree

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: "Build, Publish and Release"
33
on:
44
push:
55
tags:
6-
- 'v*.*.*'
6+
- 'v[0-9].[0-9]+.[0-9]'
77

88
env:
99
GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }}
@@ -62,4 +62,4 @@ jobs:
6262
# Release
6363

6464
- name: Deploy to Koyeb
65-
run: koyeb service redeploy hawapi/hawapi
65+
run: koyeb service redeploy project/hawapi

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ WORKDIR /app
1515

1616
COPY target/hawapi-*.jar hawapi.jar
1717

18-
EXPOSE 8080:8080
19-
CMD ["java","-jar","hawapi.jar", "-Dspring.profiles.active=prod"]
18+
EXPOSE 8000
19+
ENTRYPOINT ["java","-jar","-Dspring.profiles.active=prod","hawapi.jar"]

scripts/build-website.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ if ! [ -d ".hawapi/website" ]; then
8282
if ! [ -d ".downloads/" ]; then
8383
echo "${cyan}[$0] ${green}Directory '.downloads/' not found!"
8484
mkdir -p .downloads/
85-
wget ${website_zip} -q --show-progress -P .downloads/
85+
wget ${website_zip} -O "./.downloads/${website_repository}-main.zip" -q --show-progress
8686
echo "${cyan}[$0] Downloading '${org_name}/${website_repository}' from Github..."
87-
wget ${docs_zip} -q --show-progress -P .downloads/
87+
wget ${docs_zip} -O "./.downloads/${docs_repository}-main.zip" -q --show-progress
8888
echo "${cyan}[$0] Downloading '${org_name}/${docs_repository}' from Github..."
8989
fi
9090

src/main/resources/application-prod.properties

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ spring.config.activate.on-profile=prod
55
logging.level.org.springframework.web.servlet.mvc.method.annotation.HttpEntityMethodProcessor=WARN
66
logging.level.org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor=WARN
77

8+
# CONFIG
9+
10+
server.http2.enabled=true
11+
server.port=8000
12+
813
# ENDPOINTS
914

1015
# Enable/Disable '/register' endpoint.
@@ -25,7 +30,7 @@ logging.file.name=logs/application.log
2530
logging.file.max-history=30
2631
logging.file.max-size=10MB
2732

28-
logging.level.root=WARN
33+
logging.level.root=INFO
2934
logging.level.org.hibernate=WARN
3035
logging.level.org.springframework.web=WARN
3136
logging.level.org.springframework.security=WARN

src/test/java/com/lucasjosino/hawapi/configs/initializer/DatabaseContainerInitializer.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ abstract public class DatabaseContainerInitializer {
2424
@SuppressWarnings("resource")
2525
private static final PostgreSQLContainer<?> postgreSQLContainer = new PostgreSQLContainer<>(DB_NAME_AND_VERSION)
2626
.withCopyFileToContainer(MountableFile.forClasspathResource(SCHEMA_LOCATION), DB_ENTRY_POINT)
27-
.withExposedPorts(5432)
28-
.withReuse(true);
27+
.withExposedPorts(5432);
2928

3029
static {
3130
postgreSQLContainer.start();

0 commit comments

Comments
 (0)