Skip to content

Commit

Permalink
fixed the container port being 6000, which coinsides with X11
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Dec 22, 2022
1 parent e0f3dff commit 8d3a43a
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
name: feedback-api-keys # GITHUB_TOKEN, JWT_KEY
{{ end }}
ports:
- containerPort: 6000
- containerPort: 6001
name: feedback
securityContext:
readOnlyRootFilesystem: true
Expand Down
2 changes: 1 addition & 1 deletion deployment/k3s/templates/ingress/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
priority: 13
services:
- name: feedback-svc
port: 6000
port: 6001
- kind: Rule
match: Host(`{{ .Values.url }}`) && PathPrefix(`/api/`)
priority: 12
Expand Down
4 changes: 2 additions & 2 deletions deployment/k3s/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ spec:
deployment: feedback
ports:
- name: feedback
port: 6000
targetPort: 6000
port: 6001
targetPort: 6001
---
apiVersion: v1
kind: Service
Expand Down
4 changes: 2 additions & 2 deletions feedback/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ COPY --from=compiler /nav/target/release/navigatum-feedback /bin/navigatum-fe
ARG GIT_COMMIT_SHA
ENV GIT_COMMIT_SHA=${GIT_COMMIT_SHA}

EXPOSE 6000
EXPOSE 6001

ENTRYPOINT ["tini", "--"]
HEALTHCHECK --start-period=20m --timeout=10s CMD curl --fail localhost:6000/api/feedback/health || exit 1
HEALTHCHECK --start-period=20m --timeout=10s CMD curl --fail localhost:6001/api/feedback/health || exit 1
CMD /bin/navigatum-feedback
6 changes: 3 additions & 3 deletions feedback/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Please follow the [system dependencys docs](resources/documentation/Dependencys.
### Starting the server

Run `cargo run` to start the server.
The server should now be available on `localhost:6000`.
The server should now be available on `localhost:6001`.

Note that `cargo run --release` is used to start the server for an optimised production build (use this if you want to profile performance, it makes quite a difference).

Expand All @@ -42,11 +42,11 @@ To make sure that this specification is up-to-date and without holes, we run [sc
python -m venv venv
source venv/bin/activate
pip install schemathesis
st run --workers=auto --base-url=http://localhost:6000 --checks=all ../openapi.yaml
st run --workers=auto --base-url=http://localhost:6001 --checks=all ../openapi.yaml
```

Some fuzzing-goals may not be available for you locally, as they require prefix-routing (f.ex.`/cdn` to the CDN) and some fuzzing-goals are automatically tested in our CI.
You can exchange `--base-url=http://localhost:6000` to `--base-url=https://nav.tum.sexy` for the full public API, or restrict your scope using a option like `--endpoint=/api/feedback/`.
You can exchange `--base-url=http://localhost:6001` to `--base-url=https://nav.tum.sexy` for the full public API, or restrict your scope using a option like `--endpoint=/api/feedback/`.

## License

Expand Down
2 changes: 1 addition & 1 deletion feedback/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ async fn main() -> std::io::Result<()> {
.app_data(state_feedback.clone()),
)
})
.bind(std::env::var("BIND_ADDRESS").unwrap_or_else(|_| "0.0.0.0:6000".to_string()))?
.bind(std::env::var("BIND_ADDRESS").unwrap_or_else(|_| "0.0.0.0:6001".to_string()))?
.run()
.await
}

0 comments on commit 8d3a43a

Please sign in to comment.