Skip to content

Commit

Permalink
Added port configuration to deploy on railway
Browse files Browse the repository at this point in the history
  • Loading branch information
LauroSilveira committed Dec 19, 2023
1 parent 22d5678 commit bac079d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
3 changes: 0 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ RUN mvn clean package -DskipTests

FROM eclipse-temurin:21-jre-alpine
WORKDIR /alura-flix-api
ARG DATABASE_PRO
ARG DATABASE_TEST
ARG JWT_SECRET
COPY --from=build target/*.jar alura-flix-api.jar
EXPOSE 8080

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.alura.aluraflixapi.infraestructure.railway;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RailwayConfig {

@Bean
String getPort(){
return System.getenv("PORT");
}
}

0 comments on commit bac079d

Please sign in to comment.