~jeffa/old-jeffa.io

ref: b3b87a4bc53e647fb00b636c22baa7b1fbc90b92 old-jeffa.io/Dockerfile -rw-r--r-- 982 bytes
b3b87a4bJeff Anderson Update homepage; Remove recommended.md 1 year, 2 months 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
35
36
37
38
39
40
41
42
43
44
45
#_______________________________________#
# Build | https://hub.docker.com/_/node #
#_______________________________________#

# Start

FROM node:buster AS build
WORKDIR /jeffa.io/

# Setup

RUN npm install --global purgecss uglifycss
RUN curl -L -o /home/pandoc.deb \
    https://github.com/jgm/pandoc/releases/download/2.11.4/pandoc-2.11.4-1-amd64.deb && \
    dpkg -i /home/pandoc.deb
COPY . .

# Run

RUN sh client/build.sh

#________________________________________#
# Serve | https://hub.docker.com/_/nginx #
#________________________________________#

# Serve: Start

FROM nginx:latest
WORKDIR /jeffa.io/

# Serve: Setup

RUN apt-get update && \
    apt-get upgrade --assume-yes && \
    apt-get install --assume-yes certbot python-certbot-nginx
RUN useradd jeffa.io-nginx
COPY nginx.conf /etc/nginx/nginx.conf
COPY --from=build /jeffa.io/client/build/ /jeffa.io/client/build/
RUN mkdir ./logs/

# Serve: Run

EXPOSE 80:80
EXPOSE 443:443
CMD [ "nginx", "-g", "daemon off;" ]