forked from vikunja/website-old
feat: move all build steps to multi-stage docker image build
This commit is contained in:
parent
abf6e0f447
commit
7c502d6136
18
.drone.yml
18
.drone.yml
@ -6,24 +6,6 @@ trigger:
|
||||
- push
|
||||
|
||||
steps:
|
||||
- name: theme
|
||||
image: kolaente/toolbox
|
||||
pull: true
|
||||
group: build-static
|
||||
commands:
|
||||
- mkdir themes/vikunja -p
|
||||
- cd themes/vikunja
|
||||
- wget https://dl.vikunja.io/theme/vikunja-theme.tar.gz
|
||||
- tar -xzf vikunja-theme.tar.gz
|
||||
|
||||
- name: build
|
||||
image: klakegg/hugo:0.99.1
|
||||
pull: true
|
||||
commands:
|
||||
- rm -rf public
|
||||
- hugo
|
||||
- cat public/index.html
|
||||
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
pull: true
|
||||
|
19
Dockerfile
19
Dockerfile
@ -1,3 +1,20 @@
|
||||
FROM kolaente/toolbox AS build-theme
|
||||
|
||||
COPY . /web
|
||||
WORKDIR /web
|
||||
RUN mkdir /web/themes/vikunja -p && \
|
||||
cd /web/themes/vikunja && \
|
||||
wget https://dl.vikunja.io/theme/vikunja-theme.tar.gz && \
|
||||
tar -xzf vikunja-theme.tar.gz
|
||||
|
||||
FROM klakegg/hugo:0.99.1 as builder
|
||||
|
||||
COPY . /web
|
||||
WORKDIR /web
|
||||
COPY --from=build-theme /web/themes /web/themes
|
||||
|
||||
RUN rm -rf public && hugo
|
||||
|
||||
FROM nginx
|
||||
ADD public /usr/share/nginx/html
|
||||
COPY --from=builder /web/public /usr/share/nginx/html
|
||||
ADD nginx.conf /etc/nginx/nginx.conf
|
||||
|
Loading…
x
Reference in New Issue
Block a user