Просмотр исходного кода

:recycle: adjusting defaults

master
toj 5 лет назад
Родитель
Сommit
92b825d146
4 измененных файлов: 17 добавлений и 13 удалений
  1. 8
    1
      docker-compose.yml
  2. 1
    4
      kill_production.sh
  3. 8
    8
      nginx/Dockerfile
  4. 0
    0
      rebuild_production.sh

+ 8
- 1
docker-compose.yml Просмотреть файл

6
             context: .
6
             context: .
7
             dockerfile: ./nginx/Dockerfile
7
             dockerfile: ./nginx/Dockerfile
8
         image: proxy-nginx
8
         image: proxy-nginx
9
+        container_name: reverse-proxy
9
         ports:
10
         ports:
10
             - "80:80"
11
             - "80:80"
11
             - "443:443"
12
             - "443:443"
12
-        restart: always
13
+        restart: always
14
+        networks:
15
+            - staging_network
16
+
17
+networks:
18
+  staging_network:
19
+    external: true

+ 1
- 4
kill_production.sh Просмотреть файл

1
 #!/bin/sh
1
 #!/bin/sh
2
 
2
 
3
 ### Stops and removes the nginx proxy
3
 ### Stops and removes the nginx proxy
4
-docker stop production_nginx_1 && docker rm production_nginx_1
5
-
6
-### Stops and removes the nodejs app container
7
-# docker stop production_nodejs_1 && docker rm production_nodejs_1
4
+docker stop reverse-proxy && docker rm reverse-proxy

+ 8
- 8
nginx/Dockerfile Просмотреть файл

1
 FROM nginx
1
 FROM nginx
2
 
2
 
3
 ### Copy files from the temp build
3
 ### Copy files from the temp build
4
-COPY ./nginx/temp/index.html /opt/<CHANGE_ME>/public/index.html
4
+# COPY ./nginx/temp/index.html /opt/<path-to-project>/index.html
5
 
5
 
6
 ### Setup SSL
6
 ### Setup SSL
7
-RUN mkdir -p /etc/ssl/private && chmod 700 /etc/ssl/private
8
-RUN mkdir -p /etc/ssl/certs && chmod 700 /etc/ssl/certs
7
+# RUN mkdir -p /etc/ssl/private && chmod 700 /etc/ssl/private
8
+# RUN mkdir -p /etc/ssl/certs && chmod 700 /etc/ssl/certs
9
 
9
 
10
 ### Copy the SSL Certificate and Key
10
 ### Copy the SSL Certificate and Key
11
-COPY ./nginx/keys/letsencrypt.key /etc/ssl/private/letsencrypt.key
12
-COPY ./nginx/keys/letsencrypt.crt /etc/ssl/certs/letsencrypt.crt
11
+# COPY ./nginx/keys/letsencrypt.key /etc/ssl/private/letsencrypt.key
12
+# COPY ./nginx/keys/letsencrypt.crt /etc/ssl/certs/letsencrypt.crt
13
 
13
 
14
 ### Configure Nginx to Use SSL
14
 ### Configure Nginx to Use SSL
15
 RUN mkdir -p /etc/nginx/snippets
15
 RUN mkdir -p /etc/nginx/snippets
16
-COPY ./nginx/configs/letsencrypt.conf /etc/nginx/snippets/letsencrypt.conf
17
-COPY ./nginx/configs/ssl-params.conf /etc/nginx/snippets/ssl-params.conf
16
+# COPY ./nginx/configs/letsencrypt.conf /etc/nginx/snippets/letsencrypt.conf
17
+# COPY ./nginx/configs/ssl-params.conf /etc/nginx/snippets/ssl-params.conf
18
 
18
 
19
 ### Move over the nginx.conf and default.config server configs
19
 ### Move over the nginx.conf and default.config server configs
20
 COPY ./nginx/configs/default.conf /etc/nginx/conf.d/default.conf
20
 COPY ./nginx/configs/default.conf /etc/nginx/conf.d/default.conf
21
-COPY ./nginx/configs/nginx.conf /etc/nginx/nginx.conf
21
+COPY ./nginx/configs/nginx.conf /etc/nginx/nginx.conf

+ 0
- 0
rebuild_production.sh Просмотреть файл


Загрузка…
Отмена
Сохранить