-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: danbugs <[email protected]>
- Loading branch information
Showing
8 changed files
with
138 additions
and
3 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 |
---|---|---|
|
@@ -3,4 +3,6 @@ test.out | |
frontend/dist | ||
tokens.txt | ||
id_ranges.txt | ||
coverage.lcov | ||
coverage.lcov | ||
**.env | ||
**.pem |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,16 @@ | ||
FROM debian:bookworm-slim | ||
|
||
# Set the working directory in the container | ||
WORKDIR /usr/src/smithereens | ||
|
||
# Install the necessary library | ||
RUN apt-get update && apt-get install -y libpq5 openssl | ||
|
||
# Copy only the smithe_backend binary | ||
COPY target/x86_64-unknown-linux-gnu/release/smithe_backend . | ||
|
||
# Set the environment variable | ||
ENV ROCKET_ADDRESS=0.0.0.0 | ||
|
||
# Specify the command to run the binary | ||
CMD ["./smithe_backend"] |
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
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,61 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: backend-deployment | ||
spec: | ||
replicas: 3 | ||
selector: | ||
matchLabels: | ||
app: backend | ||
template: | ||
metadata: | ||
labels: | ||
app: backend | ||
spec: | ||
containers: | ||
- name: backend | ||
image: danstaken/smithe-backend-do:latest | ||
imagePullPolicy: Always | ||
ports: | ||
- containerPort: 8000 | ||
env: | ||
- name: PIDGTM_DATABASE_URL | ||
valueFrom: | ||
secretKeyRef: | ||
name: backend-secrets-multiple-tokens | ||
key: PIDGTM_DATABASE_URL | ||
- name: STARTGG_TOKEN | ||
valueFrom: | ||
secretKeyRef: | ||
name: backend-secrets-multiple-tokens | ||
key: STARTGG_TOKEN | ||
- name: STARTGG_TOKEN_1 | ||
valueFrom: | ||
secretKeyRef: | ||
name: backend-secrets-multiple-tokens | ||
key: STARTGG_TOKEN_1 | ||
- name: STARTGG_TOKEN_2 | ||
valueFrom: | ||
secretKeyRef: | ||
name: backend-secrets-multiple-tokens | ||
key: STARTGG_TOKEN_2 | ||
- name: STARTGG_TOKEN_3 | ||
valueFrom: | ||
secretKeyRef: | ||
name: backend-secrets-multiple-tokens | ||
key: STARTGG_TOKEN_3 | ||
- name: STARTGG_TOKEN_4 | ||
valueFrom: | ||
secretKeyRef: | ||
name: backend-secrets-multiple-tokens | ||
key: STARTGG_TOKEN_4 | ||
- name: STARTGG_TOKEN_5 | ||
valueFrom: | ||
secretKeyRef: | ||
name: backend-secrets-multiple-tokens | ||
key: STARTGG_TOKEN_5 | ||
- name: STARTGG_TOKEN_6 | ||
valueFrom: | ||
secretKeyRef: | ||
name: backend-secrets-multiple-tokens | ||
key: STARTGG_TOKEN_6 |
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,21 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: backend-ingress | ||
spec: | ||
ingressClassName: nginx | ||
tls: | ||
- hosts: | ||
- danbugsserver.com | ||
secretName: danbugsserver-tls | ||
rules: | ||
- host: danbugsserver.com | ||
http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: backend-service | ||
port: | ||
number: 80 |
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,12 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: backend-service | ||
spec: | ||
type: LoadBalancer | ||
selector: | ||
app: backend | ||
ports: | ||
- protocol: TCP | ||
port: 80 | ||
targetPort: 8000 |
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