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

Added nginx container

parent 2005baaa
Branches
No related tags found
1 merge request!1Feature nginx.
......@@ -38,7 +38,7 @@ verify_commit_HEAD
# build docker image
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
docker create --name $CONTAINER_NAME "${IMAGE_NAME}"
# remove previously copied files
......@@ -56,5 +56,6 @@ fi
if [ $RUN_TEST == "true" ]
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
\ No newline at end of file
......@@ -2,10 +2,14 @@ FROM build_mumble_web_image
USER root
RUN apk add --no-cache nginx && \
RUN apk add --no-cache bash nginx && \
adduser -D -g 'www' www && \
mkdir /config
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 {
server {
listen 443 ssl;
server_name localhost;
ssl_certificate /home/node/test.crt;
ssl_certificate_key /home/node/test.key;
ssl_certificate /config/certs/test.crt;
ssl_certificate_key /config/certs/test.key;
location / {
root /home/node/dist;
......
#!bin/bash
mv /config/nginx.conf /etc/nginx/nginx.conf
mv /config/conf/nginx.conf /etc/nginx/nginx.conf;
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