This file contains hidden or 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
// path: resolvers/mutation/login/errors/WrongCredentialsError.ts | |
import { createError } from "apollo-errors"; | |
const WrongCredentialsError = createError("WrongCredentialsError", { | |
message: "The provided credentials are invalid." | |
}); | |
export { WrongCredentialsError } |
This file contains hidden or 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
if (!areCredentialsValid) { | |
throw new Error("Authentication required"); | |
} |
This file contains hidden or 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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: prisma | |
namespace: prisma | |
spec: | |
ports: | |
- port: 4466 | |
targetPort: 4466 | |
protocol: TCP |
This file contains hidden or 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
{ | |
generateKeypair { | |
public | |
private | |
} | |
} |
This file contains hidden or 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
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: prisma | |
namespace: prisma | |
labels: | |
stage: production | |
name: prisma | |
app: prisma | |
spec: |
This file contains hidden or 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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: database | |
namespace: prisma | |
spec: | |
ports: | |
- port: 3306 | |
targetPort: 3306 | |
protocol: TCP |
This file contains hidden or 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
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: database | |
namespace: prisma | |
labels: | |
stage: production | |
name: database | |
app: mysql | |
spec: |
This file contains hidden or 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
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: prisma |
This file contains hidden or 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
#!/usr/bin/env sh | |
# | |
# iptables configuration | |
# | |
# The following allows in- and outbound traffic | |
# within a certain `CIDR` (default: `192.168.0.0/24`), | |
# but blocks all other network traffic. | |
# | |
ACCEPT_CIDR=${ALLOWED_CIDR:-192.168.0.0/24} |
This file contains hidden or 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
FROM node:8-alpine | |
LABEL maintainer="André König <[email protected]>" | |
RUN apk add --update curl iptables sudo && \ | |
addgroup -S app && adduser -S -g app app | |
COPY entrypoint.sh /entrypoint.sh | |
ENTRYPOINT ["/entrypoint.sh", "--"] |