Skip to content

Commit 7ee59d4

Browse files
authored
Merge pull request mviewer#1211 from mviewer/develop
Version 4.0
2 parents 9ed17fd + 2c0e13a commit 7ee59d4

854 files changed

Lines changed: 76373 additions & 154162 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: "Build & Push Docker image -lite for master and develop branch"
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
branches:
9+
- master
10+
- develop
11+
12+
jobs:
13+
docker-build:
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 5
16+
17+
steps:
18+
- name: "Checkout repository"
19+
uses: actions/checkout@v4
20+
21+
- name: "Determine Docker image tag"
22+
if: github.repository == 'mviewer/mviewer'
23+
run: |
24+
if [[ "${GITHUB_REF}" == "refs/heads/master" ]]; then
25+
echo "VERSION=stable-lite" >> $GITHUB_ENV
26+
elif [[ "${GITHUB_REF}" == "refs/heads/develop" ]]; then
27+
echo "VERSION=latest-lite" >> $GITHUB_ENV
28+
else
29+
echo "This action only works with master or develop branch"
30+
exit 1
31+
fi
32+
echo "Docker tag set to: ${VERSION}"
33+
34+
- name: "Build Docker image"
35+
if: github.repository == 'mviewer/mviewer'
36+
run: |
37+
docker build -t mviewer/mviewer:${VERSION} .
38+
39+
- name: "Login to Docker Hub"
40+
if: github.repository == 'mviewer/mviewer'
41+
uses: docker/login-action@v3
42+
with:
43+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
44+
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
45+
46+
- name: "Push Docker image"
47+
if: github.repository == 'mviewer/mviewer'
48+
run: |
49+
docker push mviewer/mviewer:${VERSION}

.github/workflows/build-on-push.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
name: "Building & push docker image for master and develop branch"
2+
3+
permissions:
4+
contents: read
5+
26
on:
37
push:
48
branches:
@@ -10,8 +14,10 @@ jobs:
1014
timeout-minutes: 5
1115
runs-on: ubuntu-latest
1216
steps:
13-
- name: "Checking out the repository"
14-
uses: actions/checkout@v2
17+
- name: "Checkout repository with submodules"
18+
uses: actions/checkout@v4
19+
with:
20+
submodules: recursive
1521
- name: "Calculating the docker image tag"
1622
if: github.repository == 'mviewer/mviewer'
1723
id: version
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: "Build & Push Docker image -lite on release"
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
release:
8+
types:
9+
- published
10+
11+
jobs:
12+
docker-build:
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 5
15+
16+
steps:
17+
- name: "Checkout repository"
18+
uses: actions/checkout@v4
19+
20+
- name: "Determine Docker tag"
21+
id: version
22+
if: github.repository == 'mviewer/mviewer'
23+
run: |
24+
DOCKER_TAG=$(echo "${GITHUB_REF}" | cut -d'/' -f3)
25+
echo "VERSION=${DOCKER_TAG}-lite" >> $GITHUB_ENV
26+
echo "Docker tag will be: ${DOCKER_TAG}-lite"
27+
28+
- name: "Build Docker image"
29+
if: github.repository == 'mviewer/mviewer'
30+
run: |
31+
docker build -t mviewer/mviewer:${VERSION} .
32+
33+
- name: "Login to Docker Hub"
34+
if: github.repository == 'mviewer/mviewer'
35+
uses: docker/login-action@v3
36+
with:
37+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
38+
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
39+
40+
- name: "Push Docker image"
41+
if: github.repository == 'mviewer/mviewer'
42+
run: |
43+
docker push mviewer/mviewer:${VERSION}

.github/workflows/build-on-release.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
name: "Build & push docker image on release"
2+
3+
permissions:
4+
contents: read
5+
26
on:
37
release:
48
types:
@@ -9,8 +13,10 @@ jobs:
913
timeout-minutes: 5
1014
runs-on: ubuntu-latest
1115
steps:
12-
- name: "Checking out the repository"
13-
uses: actions/checkout@v2
16+
- name: "Checkout repository with submodules"
17+
uses: actions/checkout@v4
18+
with:
19+
submodules: recursive
1420
- name: "Calculating the docker image tag"
1521
if: github.repository == 'mviewer/mviewer'
1622
id: version

.github/workflows/prettier-check.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ jobs:
99
name: Prettier checking
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v3
12+
- name: Checkout repository with submodules
13+
uses: actions/checkout@v3
14+
with:
15+
submodules: recursive
1316
- uses: actions/setup-node@v3
1417
with:
1518
node-version: 18

.gitmodules

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[submodule "demo"]
2+
path = demo
3+
url = https://github.com/mviewer/mviewer-demo.git
4+
branch = main
5+
[submodule "addons"]
6+
path = addons
7+
url = https://github.com/mviewer/mviewer-addons.git
8+
branch = main

Dockerfile

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
1-
FROM nginxinc/nginx-unprivileged:alpine
1+
# Get source code ans subodule
2+
FROM alpine/git AS gitstage
23

3-
VOLUME ["/usr/share/nginx/html/apps"]
4+
WORKDIR /src
5+
RUN git clone --recurse-submodules https://github.com/mviewer/mviewer.git -b master .
46

5-
COPY . /usr/share/nginx/html/
7+
# Final nginx image
8+
FROM nginx:alpine
9+
10+
# Copy content and submodule
11+
COPY --from=gitstage /src /usr/share/nginx/html
12+
13+
# config nginx
14+
EXPOSE 8080
15+
CMD ["nginx", "-g", "daemon off;"]

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@ Liens utiles :
1313

1414
## Déploiement
1515

16+
> Les commandes spécifique au clone sont détaillées dans la [documentation mviewer](https://mviewerdoc.readthedocs.io/fr/latest/doc_tech/deploy.html)
17+
1618
Le déploiement se passe en trois étapes :
1719

18-
- Cloner le projet dans le dossier de votre choix
20+
- Identifier votre besoin : souhaitez-vous une version sans addons et sans fichiers de démonstration ou bien une version complète ?
21+
- Cloner le projet dans le dossier de votre choix avec la commandes qui correspond à votre besoin
1922
- Copier ce dossier dans le dossier /var/www/ ( ou autres dossiers de déploiement Apache)
2023
Vous avez maintenant un visualiseur géographique fonctionnel avec les couches de la Région Bretagne
2124
- Si vous souhaitez publier vos propres couches/thèmes, modifiez le fichier `apps/default.xml`
@@ -42,10 +45,10 @@ nvm install 19
4245
nvm use 19
4346
```
4447

45-
**2. Clone du code source**
48+
**2. Clone du code source et sous-modules**
4649

4750
```
48-
git clone https://github.com/geobretagne/mviewer.git
51+
git clone https://github.com/geobretagne/mviewer.git --recurse-submodules
4952
cd mviewer
5053
```
5154

addons

Submodule addons added at fceafc4

apps/default.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<config>
3-
<application title="Mviewer" mouseposition="false" logo="" help="mviewer_help.html" measuretools="true" mapprint="true" exportpng="true" style="css/themes/wet_asphalt.css" togglealllayersfromtheme="true"/>
3+
<application title="Mviewer" mouseposition="false" logo="" help="mviewer_help.html" measuretools="true" mapprint="true" exportpng="true" togglealllayersfromtheme="true"/>
44
<mapoptions maxzoom="19" projection="EPSG:3857" center="-220750.13768758904,6144925.57790189" zoom="8" projextent="-20037508.342789244, -20037508.342789244, 20037508.342789244, 20037508.342789244" />
55

66
<baselayers style="gallery">

0 commit comments

Comments
 (0)