-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from Georiviere/feat_add_ci_installation
Feat add ci installation
- Loading branch information
Showing
25 changed files
with
419 additions
and
1 deletion.
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,14 @@ | ||
# Install dependencies only when needed | ||
FROM node:18-alpine AS deps | ||
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. | ||
RUN apk add --no-cache libc6-compat g++ gcc libgcc libstdc++ linux-headers make python3 | ||
WORKDIR /app | ||
COPY ../package.json /app/package.json | ||
COPY ../yarn.lock /app/yarn.lock | ||
RUN yarn install --frozen-lockfile | ||
|
||
FROM node:18-alpine AS builder | ||
WORKDIR /app | ||
COPY .. . | ||
COPY --from=deps /app/node_modules ./node_modules | ||
RUN yarn 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,64 @@ | ||
name: Release docker image | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write # required to publish docker image | ||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta-builder | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/georiviere-public-builder | ||
|
||
- name: Build and push Docker image builder | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
file: ./.docker/Dockerfile | ||
push: true | ||
tags: ${{ steps.meta-builder.outputs.tags }} | ||
labels: ${{ steps.meta-builder.outputs.labels }} | ||
target: builder | ||
|
||
attach_install_release: | ||
runs-on: ubuntu-latest | ||
needs: [ release ] | ||
permissions: | ||
contents: write # required to attach zip to release | ||
if: ${{ github.event_name == 'release' && github.event.action == 'created' }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Prepare install.zip | ||
run: | | ||
cd install | ||
mkdir georiviere-public | ||
cp -r * ./georiviere-public 2>/dev/null || : | ||
cp .env.dist ./georiviere-public | ||
zip -r ../install.zip georiviere-public/ | ||
- name: Attach zip archive as release binary | ||
uses: skx/github-action-publish-binaries@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
args: 'install.zip' |
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 |
---|---|---|
|
@@ -26,6 +26,8 @@ yarn-error.log* | |
|
||
# local env files | ||
.env*.local | ||
.env | ||
install/.env | ||
|
||
# vercel | ||
.vercel | ||
|
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,10 @@ | ||
# Install dependencies only when needed | ||
FROM node:18-alpine AS deps | ||
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. | ||
RUN apk add --no-cache libc6-compat g++ gcc libgcc libstdc++ linux-headers make python3 | ||
WORKDIR /app | ||
COPY package.json yarn.lock ./ | ||
RUN yarn install --frozen-lockfile | ||
COPY . . | ||
RUN yarn build | ||
CMD ["yarn", "start"] |
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
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,15 @@ | ||
version: "2.3" | ||
services: | ||
front: | ||
image: georiviere-public-dev | ||
build: | ||
context: . | ||
restart: always | ||
ports: | ||
- "${PORT:-8080}:3000" | ||
env_file: | ||
- .env | ||
volumes: | ||
- ./src:/app/src | ||
- ./translations:/app/translations | ||
- ./public:/app/public |
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 @@ | ||
NEXT_PUBLIC_API_HOST="<YOUR_API_HOST>" | ||
NEXT_PUBLIC_PORTAL=1 |
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,9 @@ | ||
ARG TAG=latest | ||
FROM ghcr.io/georiviere/georiviere-public/georiviere-public-builder:${TAG} | ||
|
||
WORKDIR /app | ||
COPY .env .env | ||
COPY translations translations | ||
RUN yarn build | ||
|
||
CMD ["yarn", "start"] |
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,142 @@ | ||
{ | ||
"header": { | ||
"logo": { | ||
"src": "/medias/logo.svg" | ||
} | ||
}, | ||
"footer": { | ||
"partners": [ | ||
{ | ||
"src": "https://randonature.parc-haut-jura.fr/medias/logos/logo_pnrhj_dark.png", | ||
"label": "Parc naturel régional du Haut-Jura", | ||
"url": "http://parc-haut-jura.fr/" | ||
}, | ||
{ | ||
"src": "https://randonature.parc-haut-jura.fr/medias/logos/logo_gtj_dark.png", | ||
"label": "Grandes traversées du Haut-Jura", | ||
"url": "https://www.gtj.asso.fr/" | ||
}, | ||
{ | ||
"src": "https://randonature.parc-haut-jura.fr/medias/logos/logo_region_aura_dark.png", | ||
"label": "La Région Auvergne-Rhône-Alpes", | ||
"url": "https://www.montagnes-du-jura.fr/" | ||
} | ||
], | ||
"informations": [ | ||
{ | ||
"name": "Parc naturel régional du Haut-Jura", | ||
"location": [ | ||
[ | ||
"29 Le Village", | ||
"39310 LAJOUX" | ||
] | ||
], | ||
"phone": [ | ||
"03 84 34 12 30" | ||
], | ||
"email": [ | ||
"[email protected]" | ||
] | ||
} | ||
], | ||
"links": [ | ||
{ | ||
"label": "Mentions légales xxxx", | ||
"url": "/page/mentions-legales" | ||
}, | ||
{ | ||
"label": "Georivière", | ||
"url": "https://georiviere.fr/" | ||
} | ||
], | ||
"socialNetworks": [ | ||
{ | ||
"label": "Facebook", | ||
"url": "https://www.facebook.com/PNRHJ/", | ||
"icon": "/medias/facebook.svg" | ||
}, | ||
{ | ||
"label": "YouTube", | ||
"url": "https://www.youtube.com/channel/UC5UbalFTYO8BlYRa9qbZmaQ/", | ||
"icon": "/medias/youtube.svg" | ||
} | ||
] | ||
}, | ||
"homepage": { | ||
"welcomeBanner": { | ||
"images": [ | ||
{ | ||
"url": "/medias/home.jpg" | ||
} | ||
], | ||
"shouldDisplayText": true | ||
}, | ||
"introduction": { | ||
"title": "Découvez la démarche", | ||
"images": [ | ||
{ | ||
"url": "/medias/illustration.jpg" | ||
} | ||
], | ||
"content": "<p class=\"my-8\">sagittis sodales neque. Aenean porttitor nunc vitae nisi fermentum tincidunt. Duis at tellus sed risus rhoncus maximus et ut erat. Vestibulum eu tempus odio, ac commodo justo. Cras eget sem ac elit aliquam scelerisque. Nulla id turpis metus. Fusce vel risus lacinia, lobortis ipsum ut, gravida felis. Donec at sollicitudin mi. Fusce ut nibh at libero feugiat faucibus. Sed maximus justo a tellus consectetur, eget accumsan libero ultrices. Vivamus sagittis faucibus pretium. Donec dui tortor, condimentum eu finibus at, feugiat lacinia lorem.</p><p class=\"my-8\">Sed tristique libero quis posuere luctus. Cras et efficitur nisl. Ut porta, ligula at auctor auctor, arcu sem tempor urna, vel convallis dui dolor quis neque. Fusce id rutrum lectus. Suspendisse potenti. Cras sodales semper bibendum. Praesent et viverra nulla. Nunc viverra ut sapien id ultricies. Fusce mollis venenatis metus, id imperdiet diam congue nec. Mauris suscipit suscipit velit, nec maximus est convallis eleifend. Phasellus a elit velit. Proin maximus, enim et gravida imperdiet, nunc enim elementum est, ut consectetur erat diam vel felis. Quisque feugiat nisl malesuada, fringilla sem non, consectetur nisi.</p>" | ||
}, | ||
"suggestions": [ | ||
{ | ||
"type": "static", | ||
"title": "Connaissances", | ||
"subtitle": "Parcourez les données et actions liées au cours d'eau sur le territoire", | ||
"content": [ | ||
{ | ||
"label": "Cours d'eau", | ||
"description": "Naviguez sur la carte pour voir les informations détaillées sur les cours d'eau du territoire", | ||
"images": [ | ||
{ | ||
"thumbnail": "/medias/placeholder0.jpg" | ||
} | ||
], | ||
"href": "/map?layers=8,10,12,14" | ||
}, | ||
{ | ||
"label": "Connaissances", | ||
"description": "Visualisez l'ensemble des observations réalisées conjointement par le parc et les contributeurs", | ||
"images": [ | ||
{ | ||
"thumbnail": "/medias/placeholder0.jpg" | ||
} | ||
], | ||
"href": "/map?layers=8,10,11,12,14" | ||
}, | ||
{ | ||
"label": "Actions", | ||
"description": "Découvez les travaux du parc dans le cadre de la gestion du territoire aquatique (animation à venir, travaux, chantiers participatifs, etc.)", | ||
"images": [ | ||
{ | ||
"thumbnail": "/medias/placeholder0.jpg" | ||
} | ||
], | ||
"href": "/map?layers=8,10,12,14" | ||
}, | ||
{ | ||
"label": "Zones sensibles", | ||
"description": "Explorez les zones de protection du biotope et de la biodiversité", | ||
"images": [ | ||
{ | ||
"thumbnail": "/medias/placeholder0.jpg" | ||
} | ||
], | ||
"href": "/map?layers=8,10,12,13,14" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "observation", | ||
"title": "Contributions", | ||
"subtitle": "Citoyen, contribuez à la connaissance des rivières aux côtés des agents du parc" | ||
}, | ||
{ | ||
"type": "action", | ||
"title": "Dernières contributions" | ||
} | ||
] | ||
} | ||
} |
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,14 @@ | ||
version: "2.3" | ||
services: | ||
front: | ||
image: georiviere-public | ||
build: | ||
context: . | ||
restart: always | ||
ports: | ||
- "${PORT:-8080}:3000" | ||
env_file: | ||
- .env | ||
volumes: | ||
- "${CUSTOMIZATION_DIRECTORY:-./customization}:/app/src/customization" | ||
- "${MEDIAS_DIRECTORY:-./medias}:/app/public/medias/" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.