-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
18 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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
ARG COMPOSER_VERSION=2.5.8 | ||
ARG WALLABAG_VERSION=2.6.2 | ||
|
||
FROM composer:$COMPOSER_VERSION as composer | ||
|
||
|
@@ -9,11 +10,24 @@ FROM golang:alpine as builder | |
# flag -ldflags "-s -w" produces a smaller executable | ||
RUN go install -ldflags "-s -w" -v github.com/a8m/envsubst/cmd/[email protected] | ||
|
||
FROM node:16-alpine3.18 as assets | ||
|
||
ARG WALLABAG_VERSION | ||
|
||
RUN set -ex \ | ||
&& apk add --no-cache curl \ | ||
&& curl -L -o /tmp/wallabag.tar.gz https://github.com/wallabag/wallabag/archive/$WALLABAG_VERSION.tar.gz \ | ||
&& tar xvf /tmp/wallabag.tar.gz -C /tmp \ | ||
&& mv /tmp/wallabag-$WALLABAG_VERSION /tmp/wallabag \ | ||
&& cd /tmp/wallabag \ | ||
&& yarn install \ | ||
&& yarn build:prod | ||
|
||
FROM alpine:3.18 | ||
|
||
COPY --from=builder /go/bin/envsubst /usr/bin/envsubst | ||
|
||
ARG WALLABAG_VERSION=2.6.3 | ||
ARG WALLABAG_VERSION | ||
|
||
RUN set -ex \ | ||
&& apk add --no-cache \ | ||
|
@@ -72,11 +86,14 @@ RUN set -ex \ | |
&& rm -rf /tmp/wallabag* \ | ||
&& cd /var/www/wallabag \ | ||
&& mkdir data/assets \ | ||
&& rm -fr web/wallassets \ | ||
&& envsubst < /etc/wallabag/parameters.template.yml > app/config/parameters.yml \ | ||
&& SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist --no-progress \ | ||
&& rm -rf /root/.composer/* /var/www/wallabag/var/cache/* /var/www/wallabag/var/logs/* /var/www/wallabag/var/sessions/* \ | ||
&& chown -R nobody:nobody /var/www/wallabag | ||
|
||
COPY --from=assets /tmp/wallabag/web/wallassets /var/www/wallabag/web/wallassets | ||
|
||
ENV PATH="${PATH}:/var/www/wallabag/bin" | ||
|
||
# Set console entry path | ||
|