Skip to content

Commit

Permalink
Bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
Kjetil Svalestuen committed Mar 16, 2020
0 parents commit 68df498
Show file tree
Hide file tree
Showing 29 changed files with 17,627 additions and 0 deletions.
90 changes: 90 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
version: 2.1
orbs:
nais: navikt/[email protected]

jobs:
build:
docker:
- image: circleci/node
steps:
- checkout
- restore_cache:
keys:
- node-v1-{{ .Branch }}-{{ checksum "package-lock.json" }}
- node-v1-{{ .Branch }}-
- node-v1-
- run: npm install
- save_cache:
paths:
- ~/usr/local/lib/node_modules
key: node-v1-{{ .Branch }}-{{ checksum "package-lock.json" }}
- run: npm run build
- nais/docker:
image: navikt/vis-stilling/vis-stilling
registry: docker.pkg.github.com

deploy-til-dev:
docker:
- image: navikt/deployment-cli:0.4.2
steps:
- checkout
- run:
name: Unpack Private Key
command: echo $GITHUB_PRIVATE_KEY | base64 -d > .circleci/github.key.pem
- nais/deploy-with-gh-app:
repo: navikt/vis-stilling
image: docker.pkg.github.com/navikt/vis-stilling/vis-stilling
github-app-id: 43789
nais-template: nais-dev.yaml
environment: dev-sbs
team: arbeidsgiver

deploy-til-prod:
docker:
- image: navikt/deployment-cli:0.4.2
steps:
- checkout
- run:
name: Unpack Private Key
command: echo $GITHUB_PRIVATE_KEY | base64 -d > .circleci/github.key.pem
- nais/deploy-with-gh-app:
repo: navikt/vis-stilling
image: docker.pkg.github.com/navikt/vis-stilling/vis-stilling
github-app-id: 43789
nais-template: nais-prod.yaml
environment: prod-sbs
team: arbeidsgiver
#
#workflows:
# bygg_og_deploy:
# jobs:
# - build:
# context: tag-ci
# - godkjenn-til-dev:
# type: approval
# requires:
# - build
# filters:
# branches:
# ignore:
# - master
# - deploy-til-dev:
# context: tag-ci
# requires:
# - godkjenn-til-dev
# - deploy-til-dev:
# context: tag-ci
# requires:
# - build
# filters:
# branches:
# only:
# - master
# - deploy-til-prod:
# context: tag-ci
# requires:
# - build
# filters:
# branches:
# only:
# - master
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/server/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

# IDEs
.vscode
.idea
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"trailingComma": "es5",
"tabWidth": 4,
"semi": true,
"singleQuote": true,
"printWidth": 100
}
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM navikt/node-express:12.2.0-alpine

WORKDIR /app

COPY build/ build/
COPY server/ server/

WORKDIR /app/server
RUN npm install

EXPOSE 3000

ENTRYPOINT ["/bin/sh", "start.sh"]
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# vis-stilling

Vis informasjon om en direktemeldt stilling (opprettet via Rekrutteringsbistand).

## Utvikling

```sh
npm install
npm run start
```

## Utvikling uten backend (mock)

```sh
npm run mock
```


# Henvendelser

## For Nav-ansatte
* Dette Git-repositoriet eies av [Team inkludering i Produktområde arbeidsgiver](https://navno.sharepoint.com/sites/intranett-prosjekter-og-utvikling/SitePages/Produktomr%C3%A5de-arbeidsgiver.aspx).
* Slack-kanaler:
* [#inkludering-utvikling](https://nav-it.slack.com/archives/CQZU35J6A)
* [#arbeidsgiver-utvikling](https://nav-it.slack.com/archives/CD4MES6BB)
* [#arbeidsgiver-general](https://nav-it.slack.com/archives/CCM649PDH)

## For folk utenfor Nav
* Opprett gjerne en issue i Github for alle typer spørsmål
* IT-utviklerne i Github-teamet https://github.com/orgs/navikt/teams/arbeidsgiver
* IT-avdelingen i [Arbeids- og velferdsdirektoratet](https://www.nav.no/no/NAV+og+samfunn/Kontakt+NAV/Relatert+informasjon/arbeids-og-velferdsdirektoratet-kontorinformasjon)
19 changes: 19 additions & 0 deletions craco.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const CracoLessPlugin = require('craco-less');

const eslint = {
enable: true,
mode: 'extends',
configure: {
extends: 'react-app',
rules: {
// Det er en bug i denne sjekken som automatisk feiler på ÆØÅ
// https://github.com/yannickcr/eslint-plugin-react/issues/1654
'react/jsx-pascal-case': 'off',
},
},
};

module.exports = {
plugins: [{ plugin: CracoLessPlugin }],
eslint,
};
24 changes: 24 additions & 0 deletions nais-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: nais.io/v1alpha1
kind: Application
metadata:
name: vis-stilling
namespace: default
labels:
team: {{ team }}
spec:
image: {{ version }}
team: {{ team }}
port: 3000
ingresses:
- https://tjenester-q0.nav.no/vis-stilling
liveness:
initialDelay: 5
path: /vis-stilling/internal/isAlive
readiness:
initialDelay: 5
path: /vis-stilling/internal/isReady
vault:
enabled: true
env:
- name: APIGW_URL
value: https://api-gw-q1.oera.no
24 changes: 24 additions & 0 deletions nais-prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: nais.io/v1alpha1
kind: Application
metadata:
name: vis-stilling
namespace: default
labels:
team: {{ team }}
spec:
image: {{ version }}
team: {{ team }}
port: 3000
ingresses:
- https://tjenester.nav.no/vis-stilling
liveness:
initialDelay: 5
path: /vis-stilling/internal/isAlive
readiness:
initialDelay: 5
path: /vis-stilling/internal/isReady
vault:
enabled: true
env:
- name: APIGW_URL
value: https://api-gw.oera.no
Loading

0 comments on commit 68df498

Please sign in to comment.