Skip to content

Commit

Permalink
Add swap to fly.io to avoid out of memory crash
Browse files Browse the repository at this point in the history
  • Loading branch information
rogargon committed Dec 2, 2023
1 parent 1026561 commit bd4e305
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions fly.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
app = "myroutes-api"

swap_size_mb = 512

# [build]
# image = "udlepssoftarch/myroutes-api:latest"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ public void initializeDatabase() {
}
if (!adminRepository.existsById("root")) {
Admin admin = new Admin();
admin.setEmail("admin@sample.app");
admin.setId("admin");
admin.setEmail("root@myroutes.app");
admin.setId("root");
admin.setPassword(defaultPassword);
admin.encodePassword();
adminRepository.save(admin);
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/features/CreateRoute.feature
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Feature: Create Route
Given I login as "admin" with password "password"
And I don't have any route
When I create a route with a title "testRoute", description "route description", type "Running" and a creationDate "2023-10-25T17:27:00Z"
Then The response code is 403
Then The response code is 401

Scenario: Create an empty route while logged in
Given I login as "user" with password "password"
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/features/UpdateRoute.feature
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Feature: Update Route
Scenario: Update a route while logged in as admin
Given I login as "admin" with password "password"
When I update a route with a title "testRoute", description "route description", type "Running" and a creationDate "2023-10-25T17:27:00Z"
Then The response code is 403
Then The response code is 401

Scenario: Update a route while logged in as reviewer
Given I login as "reviewer" with password "password"
Expand Down

0 comments on commit bd4e305

Please sign in to comment.