File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed
Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ WORKDIR /app
1515
1616# Copy CA certificates
1717COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
18+ # Copy the .env file into the container
19+ COPY .env .
1820COPY --from=builder /app/api .
1921
2022EXPOSE 8080
Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ func (app *application) run(mux http.Handler) error {
201201 }
202202
203203 srv := & http.Server {
204- Addr : ":" + port ,
204+ Addr : app . config . addr ,
205205 Handler : mux ,
206206 WriteTimeout : time .Second * 30 ,
207207 ReadTimeout : time .Second * 10 ,
Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ func main() {
114114 }
115115
116116 cfg := config {
117- addr : os .Getenv ("PORT " ),
117+ addr : os .Getenv ("ADDR " ),
118118 env : os .Getenv ("ENV" ),
119119 frontendURL : os .Getenv ("FRONTEND_URL" ),
120120 apiURL : os .Getenv ("EXTERNAL_URL" ),
You can’t perform that action at this time.
0 commit comments