Fix Dockerfile.local except volumes
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ FROM amazoncorretto:17-alpine
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY ./web/dist/ web/dist/
|
COPY ./web/dist/ web/dist/
|
||||||
COPY ./target/scala-2.13/WeatherTool-assembly-0.1.1-SNAPSHOT.jar app.jar
|
COPY ./target/scala-2.13/app.jar app.jar
|
||||||
|
|
||||||
VOLUME /app/data
|
VOLUME /app/data
|
||||||
|
|
||||||
|
|||||||
+3
-5
@@ -7,11 +7,9 @@ RUN sbt clean assembly
|
|||||||
|
|
||||||
FROM amazoncorretto:17-alpine
|
FROM amazoncorretto:17-alpine
|
||||||
|
|
||||||
WORKDIR /app
|
COPY --from=build /app/web/dist/ /web/dist/
|
||||||
|
COPY --from=build /app/target/scala-2.13/app.jar /app.jar
|
||||||
|
|
||||||
COPY --from=build /app/web/dist/ web/dist/
|
VOLUME /data
|
||||||
COPY --from=build /app/target/scala-2.13/WeatherTool-assembly-0.1.1-SNAPSHOT.jar app.jar
|
|
||||||
|
|
||||||
VOLUME /app/data
|
|
||||||
|
|
||||||
CMD ["java", "-jar", "app.jar"]
|
CMD ["java", "-jar", "app.jar"]
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ Rename `.env-sample` to `.env` and fill in credentials
|
|||||||
|
|
||||||
## Run
|
## Run
|
||||||
```
|
```
|
||||||
docker-compose up node --build
|
docker-compose up --build node
|
||||||
docker-compose up scala --build
|
docker-compose up --build scala
|
||||||
```
|
```
|
||||||
|
|
||||||
## Web
|
## Web
|
||||||
|
|||||||
@@ -5,7 +5,18 @@ ThisBuild / scalaVersion := "2.13.10"
|
|||||||
lazy val root = (project in file("."))
|
lazy val root = (project in file("."))
|
||||||
.settings(
|
.settings(
|
||||||
name := "WeatherTool",
|
name := "WeatherTool",
|
||||||
Compile / mainClass := Some("Main")
|
Compile / mainClass := Some("Main"),
|
||||||
|
|
||||||
|
// Assembly settings for consistent JAR name
|
||||||
|
assembly / assemblyJarName := "app.jar",
|
||||||
|
|
||||||
|
// Merge strategy for assembly to handle conflicts
|
||||||
|
assembly / assemblyMergeStrategy := {
|
||||||
|
case PathList("META-INF", xs @ _*) => MergeStrategy.discard
|
||||||
|
case "module-info.class" => MergeStrategy.discard
|
||||||
|
case x if x.endsWith(".conf") => MergeStrategy.concat
|
||||||
|
case x => MergeStrategy.first
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
val doobieVersion = "1.0.0-RC1"
|
val doobieVersion = "1.0.0-RC1"
|
||||||
|
|||||||
@@ -83,8 +83,10 @@ object GribParser {
|
|||||||
hour = bytes(16)
|
hour = bytes(16)
|
||||||
minute = bytes(17)
|
minute = bytes(17)
|
||||||
second = bytes(18)
|
second = bytes(18)
|
||||||
|
currentMonth = ZonedDateTime.now(ZoneOffset.UTC).getMonthValue()
|
||||||
|
validMonth = if (month < 1 || month > 12) currentMonth else month
|
||||||
referenceTime = ZonedDateTime.of(
|
referenceTime = ZonedDateTime.of(
|
||||||
year, month, day,
|
year, validMonth, day,
|
||||||
hour, minute, second, 0, // last 0 is nanos
|
hour, minute, second, 0, // last 0 is nanos
|
||||||
ZoneOffset.UTC // This is what 'Z' represents - UTC/Zero offset
|
ZoneOffset.UTC // This is what 'Z' represents - UTC/Zero offset
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user