diff options
author | ArthurHoaro <arthur@hoa.ro> | 2019-07-27 12:34:30 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2019-07-27 12:34:30 +0200 |
commit | 38672ba0d1c722e5d6d33a58255ceb55e9410e46 (patch) | |
tree | dae4c7c47532380eac3ae641db99122fc77c93dc /Dockerfile | |
parent | 83faedadff76c5bdca036f39f13943f63b27e164 (diff) | |
parent | 1e77e0448bbd25675d8c0fe4a73206ad9048904b (diff) | |
download | Shaarli-38672ba0d1c722e5d6d33a58255ceb55e9410e46.tar.gz Shaarli-38672ba0d1c722e5d6d33a58255ceb55e9410e46.tar.zst Shaarli-38672ba0d1c722e5d6d33a58255ceb55e9410e46.zip |
Merge tag 'v0.10.4' into stable
Release v0.10.4
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -5,7 +5,7 @@ FROM python:3-alpine as docs | |||
5 | ADD . /usr/src/app/shaarli | 5 | ADD . /usr/src/app/shaarli |
6 | RUN cd /usr/src/app/shaarli \ | 6 | RUN cd /usr/src/app/shaarli \ |
7 | && pip install --no-cache-dir mkdocs \ | 7 | && pip install --no-cache-dir mkdocs \ |
8 | && mkdocs build | 8 | && mkdocs build --clean |
9 | 9 | ||
10 | # Stage 2: | 10 | # Stage 2: |
11 | # - Resolve PHP dependencies with Composer | 11 | # - Resolve PHP dependencies with Composer |
@@ -15,8 +15,17 @@ RUN cd shaarli \ | |||
15 | && composer --prefer-dist --no-dev install | 15 | && composer --prefer-dist --no-dev install |
16 | 16 | ||
17 | # Stage 3: | 17 | # Stage 3: |
18 | # - Frontend dependencies | ||
19 | FROM node:9.9-alpine as node | ||
20 | COPY --from=composer /app/shaarli shaarli | ||
21 | RUN cd shaarli \ | ||
22 | && yarn install \ | ||
23 | && yarn run build \ | ||
24 | && rm -rf node_modules | ||
25 | |||
26 | # Stage 4: | ||
18 | # - Shaarli image | 27 | # - Shaarli image |
19 | FROM alpine:3.6 | 28 | FROM alpine:3.8 |
20 | LABEL maintainer="Shaarli Community" | 29 | LABEL maintainer="Shaarli Community" |
21 | 30 | ||
22 | RUN apk --update --no-cache add \ | 31 | RUN apk --update --no-cache add \ |
@@ -47,12 +56,13 @@ RUN rm -rf /etc/php7/php-fpm.d/www.conf \ | |||
47 | 56 | ||
48 | 57 | ||
49 | WORKDIR /var/www | 58 | WORKDIR /var/www |
50 | COPY --from=composer /app/shaarli shaarli | 59 | COPY --from=node /shaarli shaarli |
51 | 60 | ||
52 | RUN chown -R nginx:nginx . \ | 61 | RUN chown -R nginx:nginx . \ |
53 | && ln -sf /dev/stdout /var/log/nginx/shaarli.access.log \ | 62 | && ln -sf /dev/stdout /var/log/nginx/shaarli.access.log \ |
54 | && ln -sf /dev/stderr /var/log/nginx/shaarli.error.log | 63 | && ln -sf /dev/stderr /var/log/nginx/shaarli.error.log |
55 | 64 | ||
65 | VOLUME /var/www/shaarli/cache | ||
56 | VOLUME /var/www/shaarli/data | 66 | VOLUME /var/www/shaarli/data |
57 | 67 | ||
58 | EXPOSE 80 | 68 | EXPOSE 80 |