mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-27 23:09:35 +01:00
Merge branch 'MTRNord/Dockerfile' into 'main'
feat: Provide simple Dockerfile Closes #341 See merge request famedly/fluffychat!515
This commit is contained in:
commit
057ac63eb0
@ -262,3 +262,46 @@ release:
|
|||||||
--assets-link "{\"name\":\"fluffychat-linux-arm64.tar.gz\",\"url\":\"${PACKAGE_REGISTRY_URL}/fluffychat-linux-arm64.tar.gz\"}" \
|
--assets-link "{\"name\":\"fluffychat-linux-arm64.tar.gz\",\"url\":\"${PACKAGE_REGISTRY_URL}/fluffychat-linux-arm64.tar.gz\"}" \
|
||||||
--assets-link "{\"name\":\"fluffychat-windows.zip\",\"url\":\"${PACKAGE_REGISTRY_URL}/fluffychat-windows.zip\"}" \
|
--assets-link "{\"name\":\"fluffychat-windows.zip\",\"url\":\"${PACKAGE_REGISTRY_URL}/fluffychat-windows.zip\"}" \
|
||||||
--assets-link "{\"name\":\"fluffychat-web.tar.gz\",\"url\":\"${PACKAGE_REGISTRY_URL}/fluffychat-web.tar.gz\"}"
|
--assets-link "{\"name\":\"fluffychat-web.tar.gz\",\"url\":\"${PACKAGE_REGISTRY_URL}/fluffychat-web.tar.gz\"}"
|
||||||
|
|
||||||
|
.docker: &docker_template
|
||||||
|
image: docker:latest
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
- famedly
|
||||||
|
stage: deploy
|
||||||
|
services:
|
||||||
|
- docker:dind
|
||||||
|
|
||||||
|
docker-releases:
|
||||||
|
<<: *docker_template
|
||||||
|
script:
|
||||||
|
- docker build --pull -t "${CI_REGISTRY_IMAGE}:latest" -t "${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}" .
|
||||||
|
- docker push "${CI_REGISTRY_IMAGE}:latest"
|
||||||
|
- docker push "${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}"
|
||||||
|
rules:
|
||||||
|
- if: '$CI_COMMIT_TAG && $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+$/'
|
||||||
|
before_script:
|
||||||
|
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||||
|
|
||||||
|
docker-tags:
|
||||||
|
<<: *docker_template
|
||||||
|
script:
|
||||||
|
- docker build --pull -t "${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}" .
|
||||||
|
- docker push "${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}"
|
||||||
|
rules:
|
||||||
|
- if: '$CI_COMMIT_TAG && $CI_COMMIT_TAG !~ /^v\d+\.\d+\.\d+$/'
|
||||||
|
before_script:
|
||||||
|
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||||
|
|
||||||
|
docker-branches:
|
||||||
|
<<: *docker_template
|
||||||
|
script:
|
||||||
|
- docker build --pull -t "${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_SLUG}" -t "${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHA}" .
|
||||||
|
- docker push "${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_SLUG}"
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_TAG == null
|
||||||
|
before_script:
|
||||||
|
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||||
|
allow_failure: true
|
||||||
|
|
||||||
|
|
||||||
|
16
Dockerfile
Normal file
16
Dockerfile
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# Based upon https://github.com/Starbix/dockerimages/commit/b0c3e408263a90ee467d30aed0e855a610eb537a
|
||||||
|
|
||||||
|
FROM cirrusci/flutter:2.2.3 AS builder
|
||||||
|
|
||||||
|
RUN mkdir /fluffychat
|
||||||
|
WORKDIR /fluffychat
|
||||||
|
|
||||||
|
COPY ./ /fluffychat
|
||||||
|
|
||||||
|
RUN ./scripts/prepare-web.sh
|
||||||
|
RUN ./scripts/build-web.sh
|
||||||
|
|
||||||
|
FROM nginx:alpine
|
||||||
|
|
||||||
|
COPY --from=builder /fluffychat/build/web/ /usr/share/nginx/html
|
||||||
|
COPY --from=builder /fluffychat/config.sample.json /usr/share/nginx/html/config.json
|
Loading…
Reference in New Issue
Block a user