Files
old-svijetlastrana/Dockerfile.run

37 lines
939 B
Docker
Raw Normal View History

2018-05-22 12:40:22 +02:00
FROM nginx:latest
RUN apt-get update; apt-get install -y openssl
2018-05-25 09:12:42 +02:00
RUN apt-get install -y ca-certificates
2018-05-22 12:40:22 +02:00
RUN rm -rf /etc/nginx/conf.d/*;
COPY ./dist/default.conf /etc/nginx/conf.d/
COPY ./dist/nginx.conf /etc/nginx/
2018-04-25 13:16:36 +02:00
# Sets the arguments.
ARG BIN_NAME=nemt-portal-api
ARG APP_NAME=nemt-portal-api
ARG WORKDIR=/opt/app/
# Creates the necessary directories.
RUN mkdir -p /opt/app/docs
2018-05-22 12:40:22 +02:00
RUN mkdir -p /opt/app/certs
2018-04-25 13:16:36 +02:00
RUN mkdir -p /opt/app/static
RUN mkdir -p /var/log/bsbsi
# Copies the files to the container.
COPY ./dist/${BIN_NAME} /opt/app/${BIN_NAME}
ADD ./dist/docs/ /opt/app/docs/
2018-05-22 12:40:22 +02:00
ADD ./dist/certs/ /opt/app/certs/
2018-04-25 13:16:36 +02:00
ADD ./dist/static/ /opt/app/static/
ADD ./dist/config.toml /opt/app/config.toml
2018-05-03 07:55:09 +02:00
ADD ./dist/authorization_model.conf /opt/app/authorization_model.conf
ADD ./dist/authorization_policy.csv /opt/app/authorization_policy.csv
2018-04-25 13:16:36 +02:00
# Sets and executes the app.
WORKDIR /opt/app
2018-05-22 12:40:22 +02:00
EXPOSE 80
EXPOSE 443
CMD nginx & ./nemt-portal-api