Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
88c7fa9a47 | |||
4578e39c2d | |||
c42584f401 | |||
73da43db70 |
42
.gitlab-ci.yml
Normal file
42
.gitlab-ci.yml
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
image: docker:cli
|
||||||
|
|
||||||
|
services:
|
||||||
|
- docker:dind
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- build
|
||||||
|
- deploy
|
||||||
|
|
||||||
|
|
||||||
|
variables:
|
||||||
|
DOCKER_IMAGE_NAME: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
||||||
|
|
||||||
|
build:
|
||||||
|
stage: build
|
||||||
|
before_script:
|
||||||
|
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||||
|
script:
|
||||||
|
- docker build --pull -t "$DOCKER_IMAGE_NAME" .
|
||||||
|
- docker push "$DOCKER_IMAGE_NAME"
|
||||||
|
- |
|
||||||
|
if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then
|
||||||
|
docker tag "$DOCKER_IMAGE_NAME" "$CI_REGISTRY_IMAGE:latest"
|
||||||
|
docker push "$CI_REGISTRY_IMAGE:latest"
|
||||||
|
fi
|
||||||
|
# Run this job in a branch where a Dockerfile exists
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_BRANCH
|
||||||
|
exists:
|
||||||
|
- Dockerfile
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
stage: deploy
|
||||||
|
before_script:
|
||||||
|
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||||
|
script:
|
||||||
|
- docker pull $CI_REGISTRY_IMAGE:latest
|
||||||
|
- docker tag $CI_REGISTRY_IMAGE:latest $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
|
||||||
|
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
|
when: on_success
|
10
Caddyfile
Normal file
10
Caddyfile
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
:80 {
|
||||||
|
|
||||||
|
root * /usr/share/caddy
|
||||||
|
file_server
|
||||||
|
|
||||||
|
handle_errors {
|
||||||
|
rewrite * /{http.error.status_code}.html
|
||||||
|
file_server
|
||||||
|
}
|
||||||
|
}
|
6
Dockerfile
Normal file
6
Dockerfile
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
FROM caddy:2-alpine
|
||||||
|
|
||||||
|
COPY Caddyfile /etc/caddy/Caddyfile
|
||||||
|
COPY index.html /usr/share/caddy/
|
||||||
|
COPY bulma.min.css /usr/share/caddy/
|
||||||
|
COPY fa-5.1.0.js /usr/share/caddy/
|
@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
Site web pour présenter le projet « Carnet De Jeu ».
|
Site web pour présenter le projet « Carnet De Jeu ».
|
||||||
|
|
||||||
# License
|
# Licence
|
||||||
|
|
||||||
Cette page est délivrée sous les termes de la licence publique WTF. Pour plus d'informations, veuillez lire la [licence WTFP](./LICENSE).
|
Cette page est délivrée sous les termes de la licence publique WTF. Pour plus d'informations, veuillez lire la [licence WTFP](./LICENSE).
|
||||||
|
Reference in New Issue
Block a user