-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (31 loc) · 983 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# HQ Web frontend container definition
FROM nginx
LABEL maintainer="Renato Juacaba Neto <[email protected]>"
# Default Environment
ENV SITEMAP_BUILDER_CONFIG_PATH_FILE_SITEMAP=/home/site/sitemap.txt
# Prepare Python environment
RUN apt-get update -y
RUN apt-get install -y python3 python3-pip python3-requests
# Configure the default site
COPY nginx_conf/site_default.conf /etc/nginx/conf.d/default.conf
# Prepare startup Application
RUN mkdir -p /home/app
# Copy startup script
COPY scripts/startup.sh /home/app/startup.sh
RUN chmod 750 /home/app/startup.sh
# Copy sitemap updater
COPY scripts/sitemap_updater.py /home/app/sitemap_updater.py
RUN chmod 750 /home/app/sitemap_updater.py
# Prepare site
RUN mkdir -p /home/site
ADD site/dist/. /home/site
ADD seo/. /home/site
RUN chown nginx:nginx -R /home/site
# Publish the following ports
EXPOSE 80
# Working directory
WORKDIR /home/app
# Getting rid of /bin/sh
# RUN cp /bin/bash /bin/sh
# Launch container
CMD ./startup.sh