Fix paths in docker images
This commit is contained in:
+5
-3
@@ -1,8 +1,10 @@
|
|||||||
FROM amazoncorretto:17-alpine
|
FROM amazoncorretto:17-alpine
|
||||||
|
|
||||||
COPY ./web/dist/ /web/dist/
|
WORKDIR /app
|
||||||
COPY ./target/scala-2.13/WeatherTool-assembly-0.1.1-SNAPSHOT.jar /app.jar
|
|
||||||
|
COPY ./web/dist/ web/dist/
|
||||||
|
COPY ./target/scala-2.13/WeatherTool-assembly-0.1.1-SNAPSHOT.jar app.jar
|
||||||
|
|
||||||
VOLUME /app/data
|
VOLUME /app/data
|
||||||
|
|
||||||
CMD ["java", "-jar", "/app.jar"]
|
CMD ["java", "-jar", "app.jar"]
|
||||||
+5
-3
@@ -7,9 +7,11 @@ RUN sbt clean assembly
|
|||||||
|
|
||||||
FROM amazoncorretto:17-alpine
|
FROM amazoncorretto:17-alpine
|
||||||
|
|
||||||
COPY --from=build /app/web/dist/ /web/dist/
|
WORKDIR /app
|
||||||
COPY --from=build /app/target/scala-2.13/WeatherTool-assembly-0.1.1-SNAPSHOT.jar /app.jar
|
|
||||||
|
COPY --from=build /app/web/dist/ web/dist/
|
||||||
|
COPY --from=build /app/target/scala-2.13/WeatherTool-assembly-0.1.1-SNAPSHOT.jar app.jar
|
||||||
|
|
||||||
VOLUME /app/data
|
VOLUME /app/data
|
||||||
|
|
||||||
CMD ["java", "-jar", "/app.jar"]
|
CMD ["java", "-jar", "app.jar"]
|
||||||
|
|||||||
@@ -61,6 +61,12 @@ Run one file
|
|||||||
fly scale count 0
|
fly scale count 0
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
// check display
|
||||||
|
fly ssh console
|
||||||
|
df -h
|
||||||
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
fly scale memory 512
|
fly scale memory 512
|
||||||
```
|
```
|
||||||
@@ -55,7 +55,7 @@ class DataService(log: Logger[IO]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def getBinaryChunk(offset: Int, length: Int, fileName: String): IO[Array[Byte]] = {
|
def getBinaryChunk(offset: Int, length: Int, fileName: String): IO[Array[Byte]] = {
|
||||||
IO {
|
IO.blocking {
|
||||||
val source = Source.fromFile(s"$GRIB_FOLDER/$fileName", "ISO-8859-1")
|
val source = Source.fromFile(s"$GRIB_FOLDER/$fileName", "ISO-8859-1")
|
||||||
try {
|
try {
|
||||||
source.slice(offset, offset + length).map(_.toByte).toArray
|
source.slice(offset, offset + length).map(_.toByte).toArray
|
||||||
|
|||||||
@@ -62,7 +62,6 @@ class Server(postgresService: PostgresService, dataService: DataService, fetch:
|
|||||||
case GET -> Root / "show" / "grib-list" =>
|
case GET -> Root / "show" / "grib-list" =>
|
||||||
dataService.getFileList().flatMap(fileList => Ok(fileList.asJson))
|
dataService.getFileList().flatMap(fileList => Ok(fileList.asJson))
|
||||||
|
|
||||||
// TODO implement binary-chunk/ get request
|
|
||||||
case GET -> Root / "grib" / "binary-chunk" / ValidateInt(binaryOffset) / ValidateInt(binaryLength) / fileName =>
|
case GET -> Root / "grib" / "binary-chunk" / ValidateInt(binaryOffset) / ValidateInt(binaryLength) / fileName =>
|
||||||
dataService.getBinaryChunk(binaryOffset, binaryLength, fileName).flatMap(buffer => Ok(buffer))
|
dataService.getBinaryChunk(binaryOffset, binaryLength, fileName).flatMap(buffer => Ok(buffer))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user