Configure fly.io and docker
This commit is contained in:
@@ -0,0 +1,34 @@
|
|||||||
|
# flyctl launch added from .gitignore
|
||||||
|
**/src/main/resources/application.conf
|
||||||
|
|
||||||
|
**/project/target
|
||||||
|
**/project/project/target
|
||||||
|
**/.bsp
|
||||||
|
**/.project
|
||||||
|
**/.classpath
|
||||||
|
**/.cache
|
||||||
|
**/.settings
|
||||||
|
**/dist/*
|
||||||
|
**/lib_managed
|
||||||
|
**/ivy
|
||||||
|
**/ivy-cache
|
||||||
|
**/dependency-reduced-pom.xml
|
||||||
|
**/.history
|
||||||
|
**/.idea
|
||||||
|
**/*.iml
|
||||||
|
**/*.ipr
|
||||||
|
**/*.iws
|
||||||
|
.idea_modules
|
||||||
|
**/*.swp
|
||||||
|
**/*.swo
|
||||||
|
**/*.log
|
||||||
|
**/logs
|
||||||
|
**/.DS_Store
|
||||||
|
**/data/*
|
||||||
|
!**/project/assembly.sbt
|
||||||
|
|
||||||
|
# flyctl launch added from .idea/.gitignore
|
||||||
|
# Default ignored files
|
||||||
|
.idea/shelf
|
||||||
|
.idea/workspace.xml
|
||||||
|
fly.toml
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
FROM amazoncorretto:17-alpine
|
||||||
|
|
||||||
|
COPY ./data /data
|
||||||
|
COPY ./web /web
|
||||||
|
COPY ./target/scala-2.13/WeatherTool-assembly-0.1.1-SNAPSHOT.jar /app.jar
|
||||||
|
|
||||||
|
CMD ["java", "-jar", "/app.jar"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# fly.toml app configuration file generated for weather-tool on 2023-05-12T22:54:40+03:00
|
||||||
|
#
|
||||||
|
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
|
||||||
|
#
|
||||||
|
|
||||||
|
app = "weather-tool"
|
||||||
|
primary_region = "waw"
|
||||||
|
|
||||||
|
[http_service]
|
||||||
|
internal_port = 8080
|
||||||
|
force_https = true
|
||||||
|
auto_stop_machines = true
|
||||||
|
auto_start_machines = true
|
||||||
@@ -86,7 +86,7 @@ object Server extends IOApp {
|
|||||||
|
|
||||||
override def run(args: List[String]): IO[ExitCode] =
|
override def run(args: List[String]): IO[ExitCode] =
|
||||||
BlazeServerBuilder[IO]
|
BlazeServerBuilder[IO]
|
||||||
.bindHttp(3000, "localhost")
|
.bindHttp(8080, "0.0.0.0")
|
||||||
.withHttpApp(httpApp)
|
.withHttpApp(httpApp)
|
||||||
.serve
|
.serve
|
||||||
.compile
|
.compile
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>WeatherTool</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Hello, Weather!</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user