Skip to content

Instantly share code, notes, and snippets.

View akoenig's full-sized avatar
🐝

André König akoenig

🐝
View GitHub Profile
// path: resolvers/mutation/login/errors/WrongCredentialsError.ts
import { createError } from "apollo-errors";
const WrongCredentialsError = createError("WrongCredentialsError", {
message: "The provided credentials are invalid."
});
export { WrongCredentialsError }
if (!areCredentialsValid) {
throw new Error("Authentication required");
}
apiVersion: v1
kind: Service
metadata:
name: prisma
namespace: prisma
spec:
ports:
- port: 4466
targetPort: 4466
protocol: TCP
{
generateKeypair {
public
private
}
}
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: prisma
namespace: prisma
labels:
stage: production
name: prisma
app: prisma
spec:
apiVersion: v1
kind: Service
metadata:
name: database
namespace: prisma
spec:
ports:
- port: 3306
targetPort: 3306
protocol: TCP
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: database
namespace: prisma
labels:
stage: production
name: database
app: mysql
spec:
apiVersion: v1
kind: Namespace
metadata:
name: prisma
#!/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}
FROM node:8-alpine
LABEL maintainer="André König <andre.koenig@gmail.com>"
RUN apk add --update curl iptables sudo && \
addgroup -S app && adduser -S -g app app
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh", "--"]