Answer the question
In order to leave comments, you need to log in
How to put ssl on nginx/docker/vue?
There is an application, here are the run files:
DockerFile:
FROM node:15.10.0 as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install && npm cache clean --force
COPY ./ .
RUN npm run build
FROM nginx as production-stage
RUN mkdir /app
COPY --from=build-stage /app/dist /app
COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 9080
CMD ["nginx", "-g", "daemon off;"]
server {
location / {
root /app;
index index.html;
try_files $uri $uri/ /index.html;
}
error_page 500 502 503 504 /50x.html;
server_name blamegrief.ru www.blamegrief.ru;
location = /50x.html {
root /var/www/html;
}
listen 9080;
server_name blamegrief.ru;
ssl on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_certificate /etc/letsencrypt/live/blamegrief.ru/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/blamegrief.ru/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
docker build . -t my-app
, then docker run -p 80:9080 my-app
, and then curl localhost:80. Answer the question
In order to leave comments, you need to log in
I've been suffering for 2 days, right now it says that for some reason they were not found
docker run --rm -v /etc/letsencrypt:/etc/letsencrypt -p 80:9080 my-app
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question