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
import React from 'react' | |
function useStateManager({ initialState, reducer, createActions }) { | |
const [state, dispatch] = React.useReducer(reducer, initialState) | |
const actions = createActions({ | |
getState: () => state, | |
dispatch: (type, payload) => | |
Promise.resolve(dispatch({ type, ...(payload || {}) })) | |
}) |
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
import React from 'react' | |
import ReactDOM from 'react-dom' | |
import useStateManager from './useStateManager' | |
import createUrlLoader from './state' | |
const LogicReuse = () => { | |
const [userState, userActions] = useStateManager( | |
createUrlLoader('https://api.github.com/users/ernestofreyreg') | |
) |
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 mhart/alpine-node:10 AS builder | |
WORKDIR /app | |
COPY package.json . | |
RUN yarn install | |
COPY . . | |
RUN yarn build && yarn --production | |
FROM mhart/alpine-node:10 | |
WORKDIR /app | |
COPY --from=builder /app . |
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: "outsrc" |
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: "apps/v1" | |
kind: "Deployment" | |
metadata: | |
name: "outsrc-back-deployment" | |
namespace: "outsrc" | |
labels: | |
service: "back" | |
spec: | |
replicas: 1 | |
selector: |
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: "apps/v1" | |
kind: "Deployment" | |
metadata: | |
name: "outsrc-front-deployment" | |
namespace: "outsrc" | |
labels: | |
service: "front" | |
spec: | |
replicas: 1 | |
selector: |
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: "outsrc-front-service" | |
namespace: "outsrc" | |
labels: | |
service: "front" | |
spec: | |
selector: | |
service: "front" |
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: "outsrc-back-service" | |
namespace: "outsrc" | |
labels: | |
service: "back" | |
spec: | |
selector: | |
service: "back" |
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: "cert-manager.io/v1alpha2" | |
kind: "ClusterIssuer" | |
metadata: | |
name: "letsencrypt-staging" | |
spec: | |
acme: | |
email: "[email protected]" | |
server: "https://acme-staging-v02.api.letsencrypt.org/directory" | |
privateKeySecretRef: | |
# Secret resource used to store the account's private key. |
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: "cert-manager.io/v1alpha2" | |
kind: "ClusterIssuer" | |
metadata: | |
name: "letsencrypt-production" | |
spec: | |
acme: | |
email: "[email protected]" | |
server: "https://acme-v02.api.letsencrypt.org/directory" | |
privateKeySecretRef: | |
# Secret resource used to store the account's private key. |