Skip to content
Snippets Groups Projects
Commit 9a748ac9 authored by Armin Co's avatar Armin Co
Browse files

Added nginx container

parent 2005baaa
No related branches found
No related tags found
1 merge request!1Feature nginx.
...@@ -38,7 +38,7 @@ verify_commit_HEAD ...@@ -38,7 +38,7 @@ verify_commit_HEAD
# build docker image # build docker image
printf "\nBuilding image\n" printf "\nBuilding image\n"
docker build -t $IMAGE_NAME . > build.log docker build -t $IMAGE_NAME -f Dockerfile.mumble-web . > build.log
# create temporary container # create temporary container
docker create --name $CONTAINER_NAME "${IMAGE_NAME}" docker create --name $CONTAINER_NAME "${IMAGE_NAME}"
# remove previously copied files # remove previously copied files
...@@ -56,5 +56,6 @@ fi ...@@ -56,5 +56,6 @@ fi
if [ $RUN_TEST == "true" ] if [ $RUN_TEST == "true" ]
then then
docker run --rm -d -p 443:443 --name mumble-web-nginx-test $IMAGE_NAME docker build -t "${IMAGE_NAME}_nginx" -f webserver/Dockerfile.nginx .
docker run --rm -d -p 443:443 --name "${CONTAINER_NAME}_nginx" "${IMAGE_NAME}_nginx"
fi fi
\ No newline at end of file
...@@ -2,10 +2,14 @@ FROM build_mumble_web_image ...@@ -2,10 +2,14 @@ FROM build_mumble_web_image
USER root USER root
RUN apk add --no-cache nginx && \ RUN apk add --no-cache bash nginx && \
adduser -D -g 'www' www && \ adduser -D -g 'www' www && \
mkdir /config mkdir /config
EXPOSE 443 EXPOSE 443
COPY webserver/entrypoint.sh /
COPY webserver/ /config
CMD ./config/entrypoint.sh
\ No newline at end of file RUN chmod +x /entrypoint.sh
CMD /bin/bash ./entrypoint.sh
\ No newline at end of file
...@@ -17,8 +17,8 @@ http { ...@@ -17,8 +17,8 @@ http {
server { server {
listen 443 ssl; listen 443 ssl;
server_name localhost; server_name localhost;
ssl_certificate /home/node/test.crt; ssl_certificate /config/certs/test.crt;
ssl_certificate_key /home/node/test.key; ssl_certificate_key /config/certs/test.key;
location / { location / {
root /home/node/dist; root /home/node/dist;
......
#!bin/bash mv /config/conf/nginx.conf /etc/nginx/nginx.conf;
mv /config/nginx.conf /etc/nginx/nginx.conf
nginx -g 'daemon off;'; nginx -s reload; nginx -g 'daemon off;'; nginx -s reload;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment