-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#446] Add files support creating mock server
- Loading branch information
1 parent
98d42ae
commit 6b90e03
Showing
5 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM stoplight/prism:latest | ||
|
||
COPY /docs /usr/src/prism/packages/cli/docs/ | ||
|
||
EXPOSE 80 | ||
|
||
CMD ["mock", "-h", "0.0.0.0", "-p", "80", "docs/openapi/openapi.yml"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
.template/addons/github/.github/workflows/deploy_mock_server.yml.tt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Deploy Mock Server | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy mock server | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up flyctl | ||
uses: superfly/flyctl-actions/setup-flyctl@master | ||
|
||
- name: Deploy to fly | ||
run: flyctl deploy --remote-only | ||
env: | ||
FLY_API_TOKEN: {{ "${{ secrets.FLY_API_TOKEN }}" }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
app = "api-mock-server" | ||
primary_region = "sin" | ||
|
||
[build] | ||
dockerfile = "Dockerfile.mock" | ||
|
||
[http_service] | ||
internal_port = 80 | ||
force_https = true | ||
auto_stop_machines = true | ||
auto_start_machines = true | ||
min_machines_running = 0 | ||
processes = ["app"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters