Configure fly.io and docker

This commit is contained in:
Guntis Smaukstelis
2023-05-12 23:57:04 +03:00
parent c07604512c
commit 7cb6349ac7
5 changed files with 65 additions and 1 deletions
+34
View File
@@ -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
+7
View File
@@ -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"]
+13
View File
@@ -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
+1 -1
View File
@@ -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
+10
View File
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>WeatherTool</title>
</head>
<body>
<h1>Hello, Weather!</h1>
</body>
</html>