-
Notifications
You must be signed in to change notification settings - Fork 1
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
Eric Thuaud
committed
Jun 23, 2022
1 parent
a9a9d2b
commit 8b9fb47
Showing
88 changed files
with
16,414 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
SKIP_PREFLIGHT_CHECK=true | ||
ACCESS_API_URL=https://coleman-access-api.dev.insee.io | ||
AUTHENTICATION_MODE=anonymous |
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,27 @@ | ||
{ | ||
"parser": "babel-eslint", | ||
"extends": ["airbnb", "prettier"], | ||
"plugins": ["prettier"], | ||
"rules": { | ||
"prettier/prettier": ["error"], | ||
"linebreak-style": 0, | ||
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }], | ||
"react/jsx-curly-brace-presence": "off", | ||
"jsx-a11y/label-has-for": "off", | ||
"no-irregular-whitespace": [1, { "skipStrings": true }] | ||
}, | ||
"env": { | ||
"jest": true | ||
}, | ||
"settings": { | ||
"import/resolver": { | ||
"node": { | ||
"paths": ["src"] | ||
} | ||
} | ||
}, | ||
"globals": { | ||
"fetch": true, | ||
"window": true | ||
} | ||
} |
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,32 @@ | ||
name: Build | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "*" | ||
|
||
jobs: | ||
install: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Use Node.js 14C | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
- run: yarn --frozen-lockfile | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js 14 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
- run: yarn | ||
- run: yarn run test | ||
- run: yarn build | ||
- name: Upload build | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: build | ||
path: build |
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,55 @@ | ||
name: Release Candidate | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'develop' | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
install: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Use Node.js 14C | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
- run: yarn --frozen-lockfile | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js 14 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
- run: yarn | ||
- run: yarn build | ||
- name: Upload build | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: build | ||
path: build | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout current branch | ||
uses: actions/checkout@v2 | ||
- name: Get current version | ||
id: version | ||
uses: notiz-dev/github-action-json-property@release | ||
with: | ||
path: 'package.json' | ||
prop_path: 'version' | ||
- run: echo ${{steps.version.outputs.prop}} | ||
- name: Release snapshot | ||
id: release-snapshot | ||
uses: actions/create-release@latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{steps.version.outputs.prop}}-rc | ||
release_name: Release Candidate ${{steps.version.outputs.prop}} | ||
draft: false | ||
prerelease: false |
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,81 @@ | ||
name: Release & Docker | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
install: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Use Node.js 14C | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
- run: yarn --frozen-lockfile | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js 14 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
- run: yarn | ||
- run: yarn build | ||
- name: Upload build | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: build | ||
path: build | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout current branch | ||
uses: actions/checkout@v2 | ||
- name: Get current version | ||
id: version | ||
uses: notiz-dev/github-action-json-property@release | ||
with: | ||
path: 'package.json' | ||
prop_path: 'version' | ||
- run: echo ${{steps.version.outputs.prop}} | ||
- name: Release snapshot | ||
id: release-snapshot | ||
uses: actions/create-release@latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{steps.version.outputs.prop}} | ||
release_name: ${{steps.version.outputs.prop}} | ||
draft: false | ||
prerelease: false | ||
docker: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Download build | ||
id: download | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: build | ||
path: build | ||
- name: Get current version | ||
id: version | ||
uses: notiz-dev/github-action-json-property@release | ||
with: | ||
path: 'package.json' | ||
prop_path: 'version' | ||
- run: echo ${{steps.version.outputs.prop}} | ||
- name: Publish to Registry | ||
uses: elgohr/Publish-Docker-Github-Action@master | ||
with: | ||
name: inseefr/coleman-access | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
tags: ${{steps.version.outputs.prop}} | ||
|
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,25 @@ | ||
# See https://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
/exemple | ||
/graphisme | ||
/specif | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
*.zip | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
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,17 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: coleman-access | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: coleman-access | ||
template: | ||
metadata: | ||
labels: | ||
app: coleman-access | ||
spec: | ||
containers: | ||
- name: coleman-access | ||
image: inseefr/coleman-access:0.10.0 |
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,21 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: coleman-access-ingress | ||
annotations: | ||
kubernetes.io/ingress.class: nginx | ||
spec: | ||
tls: | ||
- hosts: | ||
- particuliers.dev.insee.io | ||
rules: | ||
- host: particuliers.dev.insee.io | ||
http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: coleman-access-svc | ||
port: | ||
number: 80 |
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,11 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: coleman-access-svc | ||
spec: | ||
selector: | ||
app: coleman-access | ||
ports: | ||
- protocol: TCP | ||
port: 80 | ||
targetPort: 80 |
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,6 @@ | ||
{ | ||
"printWidth": 100, | ||
"singleQuote": true, | ||
"trailingComma": "es5", | ||
"linebreak-style": "windows" | ||
} |
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,17 @@ | ||
FROM nginx | ||
COPY build /usr/share/nginx/html | ||
RUN rm etc/nginx/conf.d/default.conf | ||
COPY nginx-coleman-promotion.conf etc/nginx/conf.d/ | ||
|
||
|
||
# Copy .env file and shell script to container | ||
WORKDIR /usr/share/nginx/html | ||
COPY ./scripts/env.sh . | ||
COPY .env . | ||
|
||
# Make shell script executable | ||
RUN chmod +x env.sh | ||
|
||
# Start Nginx server | ||
CMD ["/bin/bash", "-c", "/usr/share/nginx/html/env.sh && nginx -g \"daemon off;\""] | ||
|
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,2 @@ | ||
Portail de promotion des enquêtes ménages de la plateforme coleman mis en place dans le cadre du project Métallica | ||
|
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,5 @@ | ||
{ | ||
"compilerOptions": { | ||
"baseUrl": "./src" | ||
} | ||
} |
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,29 @@ | ||
server { | ||
listen 80 default_server; | ||
server_name /usr/share/nginx/html; | ||
|
||
root /usr/share/nginx/html; | ||
index index.html; | ||
|
||
location ~* \.(?:manifest|appcache|html?|xml|json)$ { | ||
expires -1; | ||
# access_log logs/static.log; # I don't usually include a static log | ||
} | ||
|
||
location ~* \.(?:css|js)$ { | ||
try_files $uri =404; | ||
expires 1y; | ||
access_log off; | ||
add_header Cache-Control "public"; | ||
} | ||
|
||
# Any route containing a file extension (e.g. /devicesfile.js) | ||
location ~ ^.+\..+$ { | ||
try_files $uri =404; | ||
} | ||
|
||
# Any route that doesn't have a file extension (e.g. /devices) | ||
location / { | ||
try_files $uri $uri/ /index.html; | ||
} | ||
} |
Oops, something went wrong.