File tree 3 files changed +26
-29
lines changed
3 files changed +26
-29
lines changed Original file line number Diff line number Diff line change 1
- server {
2
- listen 8080;
3
1
server_name apimanager;
4
2
5
3
location / {
@@ -12,12 +10,11 @@ server {
12
10
}
13
11
14
12
location /en/static {
15
- alias /usr/share/nginx/html ;
13
+ alias /opt/app-root/src ;
16
14
}
17
15
location /es/static {
18
- alias /usr/share/nginx/html ;
16
+ alias /opt/app-root/src ;
19
17
}
20
18
location /static {
21
- alias /usr/share/nginx/html;
22
- }
23
- }
19
+ alias /opt/app-root/src;
20
+ }
Original file line number Diff line number Diff line change @@ -5,8 +5,6 @@ RUN pip install -r /app/requirements.txt
5
5
WORKDIR /app
6
6
RUN python ./apimanager/manage.py collectstatic --noinput
7
7
FROM nginxinc/nginx-unprivileged:stable
8
- COPY .github/ apimanager.conf /etc/nginx/conf.d/
8
+ COPY nginx. apimanager.conf /etc/nginx/conf.d/apimanager.conf
9
9
COPY --from=builder /app/apimanager/static /usr/share/nginx/html
10
- CMD nginx -g "daemon off;"
11
-
12
-
10
+ CMD nginx -g "daemon off;"
Original file line number Diff line number Diff line change 1
- # nginx server configuration for apimanager
2
-
3
1
server {
4
- listen 80 default_server;
5
- listen [::]:80 default_server;
6
-
7
- server_name apimanager;
2
+ listen 8080;
3
+ server_name apimanager;
8
4
9
- location / {
10
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
11
- # enable this if and only if you use HTTPS
12
- # proxy_set_header X-Forwarded-Proto https;
13
- proxy_set_header Host $http_host;
14
- proxy_redirect off;
15
- proxy_pass http://127.0.0.1:8000;
16
- }
5
+ location / {
6
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
7
+ # enable this if and only if you use HTTPS
8
+ # proxy_set_header X-Forwarded-Proto https;
9
+ proxy_set_header Host $http_host;
10
+ proxy_redirect off;
11
+ proxy_pass http://127.0.0.1:8000;
12
+ }
17
13
18
- location /static {
19
- alias /var/www/apimanager/static-collected;
20
- }
21
- }
14
+ location /en/static {
15
+ alias /usr/share/nginx/html;
16
+ }
17
+ location /es/static {
18
+ alias /usr/share/nginx/html;
19
+ }
20
+ location /static {
21
+ alias /usr/share/nginx/html;
22
+ }
23
+ }
You can’t perform that action at this time.
0 commit comments