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

: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,7 +6,14 @@ services:
6 6
             context: .
7 7
             dockerfile: ./nginx/Dockerfile
8 8
         image: proxy-nginx
9
+        container_name: reverse-proxy
9 10
         ports:
10 11
             - "80:80"
11 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,7 +1,4 @@
1 1
 #!/bin/sh
2 2
 
3 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,21 +1,21 @@
1 1
 FROM nginx
2 2
 
3 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 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 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 14
 ### Configure Nginx to Use SSL
15 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 19
 ### Move over the nginx.conf and default.config server configs
20 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 Просмотреть файл


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