forked from StackStorm/st2web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-nginx
26 lines (20 loc) · 857 Bytes
/
Dockerfile-nginx
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
FROM node:20.8.1 as build
# Create app directory
WORKDIR /opt/stackstorm/static/webui/st2web
# get files
COPY . /opt/stackstorm/static/webui/st2web
RUN rm /opt/stackstorm/static/webui/st2web/yarn.lock
# install dependencies
RUN make build-and-install
# expose your ports
EXPOSE 3000
FROM nginx
RUN rm -f /etc/nginx/conf.d/default.conf
# COPY ./nginx.local.conf /etc/nginx/conf.d/default.conf
COPY ./nginx.local.conf /etc/nginx/conf.d/st2.conf
COPY --from=build /opt/stackstorm/static/webui /opt/stackstorm/static/webui
# Generate self-signed certificate or place your existing certificate under /etc/ssl/st2
RUN mkdir -p /etc/ssl/st2
RUN openssl req -x509 -newkey rsa:2048 -keyout /etc/ssl/st2/st2.key -out /etc/ssl/st2/st2.crt \
-days 365 -nodes -subj "/C=US/ST=California/L=Palo Alto/O=StackStorm/OU=Information \
Technology/CN=$(hostname)"