-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
440 additions
and
93 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,5 @@ data | |
.env | ||
.env.local | ||
private_key.pem | ||
.errorviz-version | ||
.errorviz-version | ||
skaffold.generated.yaml |
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 |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
"chrono", | ||
"deks", | ||
"dotenv", | ||
"flexauth", | ||
"inhouse", | ||
"jsonwebtoken", | ||
"lettre", | ||
|
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,22 @@ | ||
# Docker File for SMTP Server | ||
FROM ubuntu:latest AS smtp | ||
|
||
ARG EMAIL | ||
ARG EMAIL_PASSWORD | ||
ARG MAIL_NAME | ||
ARG SMTP_DOMAIN | ||
ARG SMTP_PORT | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y mailutils && \ | ||
apt install -y postfix | ||
|
||
COPY /main.cf /etc/postfix/main.cf | ||
|
||
RUN sh -c 'echo "root: ${EMAIL}" >> /etc/aliases' && \ | ||
sh -c 'echo "${MAIL_NAME}" >> /etc/mailname' && \ | ||
sh -c 'echo "[${SMTP_DOMAIN}]:${SMTP_PORT} ${EMAIL}:${EMAIL_PASSWORD}" >> /etc/postfix/sasl_passwd' && \ | ||
postmap /etc/postfix/sasl_passwd && \ | ||
chmod 0600 /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db | ||
|
||
CMD service postfix restart && tail -f /dev/null |
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,7 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: flexauth-config | ||
namespace: flexauth | ||
data: | ||
database_url: mongodb-service |
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,95 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: flexauth-server | ||
namespace: flexauth | ||
labels: | ||
app: flexauth-server | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: flexauth-server | ||
template: | ||
metadata: | ||
labels: | ||
app: flexauth-server | ||
spec: | ||
containers: | ||
- name: flexauth-server | ||
image: flexauth-server:latest | ||
imagePullPolicy: IfNotPresent | ||
ports: | ||
- containerPort: 8080 | ||
env: | ||
- name: MONGO_URI | ||
valueFrom: | ||
configMapKeyRef: | ||
name: flexauth-config | ||
key: database_url | ||
- name: PORT | ||
valueFrom: | ||
secretKeyRef: | ||
name: flexauth-secrets | ||
key: PORT | ||
- name: SERVER_KEK | ||
valueFrom: | ||
secretKeyRef: | ||
name: flexauth-secrets | ||
key: SERVER_KEK | ||
- name: EMAIL | ||
valueFrom: | ||
secretKeyRef: | ||
name: flexauth-secrets | ||
key: EMAIL | ||
- name: EMAIL_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: flexauth-secrets | ||
key: EMAIL_PASSWORD | ||
- name: MAIL_NAME | ||
valueFrom: | ||
secretKeyRef: | ||
name: flexauth-secrets | ||
key: MAIL_NAME | ||
- name: SMTP_DOMAIN | ||
valueFrom: | ||
secretKeyRef: | ||
name: flexauth-secrets | ||
key: SMTP_DOMAIN | ||
- name: SMTP_PORT | ||
valueFrom: | ||
secretKeyRef: | ||
name: flexauth-secrets | ||
key: SMTP_PORT | ||
- name: X_API_KEY | ||
valueFrom: | ||
secretKeyRef: | ||
name: flexauth-secrets | ||
key: X_API_KEY | ||
- name: MONGO_INITDB_ROOT_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: flexauth-secrets | ||
key: MONGO_INITDB_ROOT_PASSWORD | ||
- name: MONGO_INITDB_ROOT_USERNAME | ||
valueFrom: | ||
secretKeyRef: | ||
name: flexauth-secrets | ||
key: MONGO_INITDB_ROOT_USERNAME | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: flexauth-service | ||
namespace: flexauth | ||
spec: | ||
type: NodePort | ||
selector: | ||
app: flexauth-server | ||
ports: | ||
- protocol: TCP | ||
port: 8080 | ||
targetPort: 8080 | ||
nodePort: 30008 |
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,46 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: mongodb | ||
namespace: flexauth | ||
labels: | ||
app: mongodb | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: mongodb | ||
template: | ||
metadata: | ||
labels: | ||
app: mongodb | ||
spec: | ||
containers: | ||
- name: mongodb | ||
image: mongo | ||
ports: | ||
- containerPort: 27017 | ||
env: | ||
- name: MONGO_INITDB_ROOT_USERNAME | ||
valueFrom: | ||
secretKeyRef: | ||
name: flexauth-secrets | ||
key: MONGO_INITDB_ROOT_USERNAME | ||
- name: MONGO_INITDB_ROOT_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: flexauth-secrets | ||
key: MONGO_INITDB_ROOT_PASSWORD | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: mongodb-service | ||
namespace: flexauth | ||
spec: | ||
selector: | ||
app: mongodb | ||
ports: | ||
- protocol: TCP | ||
port: 27017 | ||
targetPort: 27017 |
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,63 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: mongodb-express | ||
namespace: flexauth | ||
labels: | ||
app: mongodb-express | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: mongodb-express | ||
template: | ||
metadata: | ||
labels: | ||
app: mongodb-express | ||
spec: | ||
containers: | ||
- name: mongodb-express | ||
image: mongo-express | ||
ports: | ||
- containerPort: 8081 | ||
env: | ||
- name: ME_CONFIG_MONGODB_SERVER | ||
valueFrom: | ||
configMapKeyRef: | ||
name: flexauth-config | ||
key: database_url | ||
- name: ME_CONFIG_MONGODB_ADMINUSERNAME | ||
valueFrom: | ||
secretKeyRef: | ||
name: flexauth-secrets | ||
key: MONGO_INITDB_ROOT_USERNAME | ||
- name: ME_CONFIG_MONGODB_ADMINPASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: flexauth-secrets | ||
key: MONGO_INITDB_ROOT_PASSWORD | ||
- name: ME_CONFIG_BASICAUTH_USERNAME | ||
valueFrom: | ||
secretKeyRef: | ||
name: flexauth-secrets | ||
key: MONGO_INITDB_ROOT_USERNAME | ||
- name: ME_CONFIG_BASICAUTH_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: flexauth-secrets | ||
key: MONGO_INITDB_ROOT_PASSWORD | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: mongodb-express-service | ||
namespace: flexauth | ||
spec: | ||
selector: | ||
app: mongodb-express | ||
type: LoadBalancer | ||
ports: | ||
- protocol: TCP | ||
port: 8081 | ||
targetPort: 8081 | ||
nodePort: 30000 |
Oops, something went wrong.