File tree Expand file tree Collapse file tree 8 files changed +42
-59
lines changed Expand file tree Collapse file tree 8 files changed +42
-59
lines changed File renamed without changes.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -2,17 +2,11 @@ version: "3.7"
2
2
services :
3
3
auth :
4
4
build : ./nginx
5
- image : aussume_nginx_auth
5
+ image : registry_nginx_proxy
6
6
ports :
7
- - 5001:80
7
+ - 5000:5000
8
8
links :
9
9
- registry
10
- environment :
11
- USER : " <YourUserName>"
12
- PASS : " <YourPassword>"
13
- # depends_on:
14
- # - registry
15
10
16
11
registry :
17
12
image : registry:latest
18
-
Original file line number Diff line number Diff line change @@ -5,13 +5,13 @@ RUN apt-get update -y \
5
5
apache2-utils \
6
6
&& rm -rf /var/lib/apt/lists/*
7
7
8
- ENV FORWARD_PORT=80
8
+ ENV FORWARD_PORT=5000
9
9
10
10
WORKDIR /opt
11
11
12
12
# RUN apk add --no-cache gettext
13
13
14
- COPY auth .conf auth.htpasswd launch.sh ./
14
+ COPY nginx .conf auth.conf launch.sh ./
15
15
16
16
RUN chmod 0755 ./launch.sh
17
17
Original file line number Diff line number Diff line change 1
1
server {
2
- listen *:80 default_server;
2
+ listen *:5000 default_server;
3
3
return 444;
4
4
}
5
5
6
6
server {
7
- listen *:80 ;
7
+ listen *:5000 ;
8
8
server_name 127.0.0.1;
9
9
10
10
location / {
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
3
-
4
3
envsubst < auth.conf > /etc/nginx/conf.d/auth.conf
5
- envsubst < auth.htpasswd > /etc/nginx/auth.htpasswd
6
-
7
- htpasswd -c -b /etc/nginx/auth.htpasswd $USER $PASS
8
-
9
- echo basic-auth-pwd
10
- cat /etc/nginx/auth.htpasswd
4
+ envsubst < nginx.conf > /etc/nginx/nginx.conf
11
5
12
6
nginx -g " daemon off;"
Original file line number Diff line number Diff line change
1
+
2
+ user nginx;
3
+ worker_processes 1;
4
+
5
+ error_log /var/log/nginx/error.log warn;
6
+ pid /var/run/nginx.pid ;
7
+
8
+
9
+ events {
10
+ worker_connections 1024 ;
11
+ }
12
+
13
+
14
+ http {
15
+ include /etc/nginx/mime.types ;
16
+ default_type application/octet-stream ;
17
+
18
+ log_format main '$remote_addr - $remote_user [$time_local] "$request" '
19
+ '$status $body_bytes_sent "$http_referer" '
20
+ '"$http_user_agent" "$http_x_forwarded_for"' ;
21
+
22
+ access_log /var/log/nginx/access.log main;
23
+
24
+ sendfile on;
25
+ #tcp_nopush on;
26
+
27
+ keepalive_timeout 65 ;
28
+
29
+ #gzip on;
30
+
31
+ # disable client body size check
32
+ client_max_body_size 0;
33
+
34
+ include /etc/nginx/conf.d/*.conf;
35
+ }
You can’t perform that action at this time.
0 commit comments