This repository was archived by the owner on Oct 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile
More file actions
85 lines (64 loc) · 2.45 KB
/
Copy pathDockerfile
File metadata and controls
85 lines (64 loc) · 2.45 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
FROM ubuntu:16.04
ARG GITLAB_USER
ARG GITLAB_PASSWORD
# install dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
nginx \
&& rm -r /var/lib/apt/lists/*
# Default command
# Install Node.js
RUN apt-get update \
&& apt-get install --yes curl
RUN curl --silent --location https://deb.nodesource.com/setup_7.x | bash -
RUN apt-get install --yes nodejs
RUN apt-get install --yes build-essential
RUN npm install --global surge
RUN apt-get install --yes nano
RUN apt-get install --yes git
ADD .netrc /root
RUN echo "USER: $GITLAB_USER"
RUN echo "PASS: $GITLAB_PASSWORD"
RUN echo " login $GITLAB_USER" >> /root/.netrc
RUN echo " password $GITLAB_PASSWORD" >> /root/.netrc
RUN git config --global user.email " fsaiyed@officebrain.com"
RUN git config --global user.name "Faizan Saiyed"
# add project data
WORKDIR /opt/app
ADD . /opt/app
RUN npm install
# ssl certificate add
ADD cert /etc/ssl/cert
ADD privkey /etc/ssl/privkey
# make websites and plugins folder
RUN mkdir /var/www/html/websites
RUN mkdir /var/www/html/plugins
RUN cp -a -f /opt/app/plugins/* /var/www/html/plugins/
RUN mv /opt/app/package2.json /var/www/html/package.json
RUN cp /opt/app/nginx.conf /etc/nginx/sites-available/
RUN cp /opt/app/qa.conf /etc/nginx/sites-available/
RUN cp /opt/app/flowz.conf /etc/nginx/sites-available/
RUN cp /opt/app/distributor.conf /etc/nginx/sites-available/
RUN ln -s /etc/nginx/sites-available/nginx.conf /etc/nginx/sites-enabled/
RUN ln -s /etc/nginx/sites-available/qa.conf /etc/nginx/sites-enabled/
RUN ln -s /etc/nginx/sites-available/flowz.conf /etc/nginx/sites-enabled/
RUN ln -s /etc/nginx/sites-available/distributor.conf /etc/nginx/sites-enabled/
# uncomment chosen locale to enable it's generation
RUN sed -i 's/# gzip_vary on;/gzip_vary on;/' /etc/nginx/nginx.conf
RUN sed -i 's/# gzip_proxied any;/gzip_proxied any;/' /etc/nginx/nginx.conf
RUN sed -i 's/# gzip_comp_level 6;/gzip_comp_level 6;/' /etc/nginx/nginx.conf
RUN sed -i 's/# gzip_buffers 16 8k;/gzip_buffers 16 8k;/' /etc/nginx/nginx.conf
RUN sed -i 's/# gzip_http_version 1.1;/gzip_http_version 1.1;/' /etc/nginx/nginx.conf
RUN sed -i 's/# gzip_types/gzip_types/' /etc/nginx/nginx.conf
WORKDIR /var/www/html
RUN npm install
RUN apt-get install -y default-jre
WORKDIR /opt/app
CMD service nginx start && npm start
#RUN a2enmod rewrite
#RUN a2enmod ssl
#RUN service nginx restart
#RUN a2enmod rewrite
#RUN a2enmod vhost_alias
#RUN service apache2 restart
EXPOSE 80 3032 4032 443