~cytrogen/masto-fe

ref: dc35e2d7569a293bbda92ee3ecba8d2d4e6a7b64 masto-fe/Dockerfile -rw-r--r-- 1007 bytes
dc35e2d7 — Cytrogen Rename .scss → .css and remove sass dependency (Phase 9-10) 13 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
### BUILDER IMAGE ###
FROM docker.io/superseriousbusiness/masto-fe-standalone-woodpecker-build:0.1.0 AS builder

# Prepare the build directory, copy
# relevant source + config files over.
WORKDIR /build
COPY --chown=node:node app /build/app
COPY --chown=node:node config /build/config
COPY --chown=node:node public /build/public
COPY --chown=node:node \
    .browserslistrc \
    babel.config.js \
    jsconfig.json \
    package.json \
    tsconfig.json \
    yarn.lock \
    /build/

# Create a production build of the frontend.
RUN yarn && yarn build:production

### RUNTIME IMAGE ###
FROM nginx:alpine AS runtime

# Copy bigger nested stuff.
COPY --from=builder /build/public/packs/js/flavours/glitch /usr/share/nginx/html/packs/js/flavours/glitch
COPY --from=builder /build/public/packs/js/flavours/vanilla /usr/share/nginx/html/packs/js/flavours/vanilla

# Copy remaining files.
COPY --from=builder /build/public /usr/share/nginx/html/

# Set up nginx.
COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 80