Made program generate SSL

This commit is contained in:
2025-04-15 16:14:04 +02:00
parent 7519f21389
commit a5824f8b51
7 changed files with 39 additions and 56 deletions

View File

@@ -1,21 +1,13 @@
FROM node:18-alpine as build
FROM node:18-alpine AS build
WORKDIR /build
ADD . .
RUN [ "npm", "ci" ]
COPY <<EOF src/environments/environment.ts
export const environment = {
apiEndpoint: `http://localhost/api`,
version: "v1.0.0",
vapid: {
pubkey: `${VAPID}`
},
production: true
};
EOF
RUN [ "npm", "run", "build" ]
FROM httpd:alpine as runtime
FROM httpd:alpine AS runtime
RUN apk add --no-cache certbot certbot-apache
COPY httpd.conf /usr/local/apache2/conf/httpd.conf
COPY cli.ini /etc/letsencrypt/cli.ini
COPY --from=build /build/dist /usr/local/apache2/htdocs/
COPY <<EOF /usr/local/apache2/htdocs/ipwa/.htaccess
RewriteEngine on
@@ -25,4 +17,7 @@ RewriteRule ^ - [L]
RewriteRule ^ /ipwa/index.html
EOF
RUN chmod +rx /usr/local/apache2/htdocs/ipwa/.htaccess
COPY entrypoint.sh entrypoint.sh
EXPOSE 80
EXPOSE 443
CMD ["sh", "entrypoint.sh"]