Skip to content

Commit 5aead1b

Browse files
committed
really fix pipeline
1 parent e106ef8 commit 5aead1b

File tree

3 files changed

+26
-29
lines changed

3 files changed

+26
-29
lines changed

.github/apimanager.conf

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
server {
2-
listen 8080;
31
server_name apimanager;
42

53
location / {
@@ -12,12 +10,11 @@ server {
1210
}
1311

1412
location /en/static {
15-
alias /usr/share/nginx/html;
13+
alias /opt/app-root/src;
1614
}
1715
location /es/static {
18-
alias /usr/share/nginx/html;
16+
alias /opt/app-root/src;
1917
}
2018
location /static {
21-
alias /usr/share/nginx/html;
22-
}
23-
}
19+
alias /opt/app-root/src;
20+
}

Dockerfile_nginx

+2-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ RUN pip install -r /app/requirements.txt
55
WORKDIR /app
66
RUN python ./apimanager/manage.py collectstatic --noinput
77
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
99
COPY --from=builder /app/apimanager/static /usr/share/nginx/html
10-
CMD nginx -g "daemon off;"
11-
12-
10+
CMD nginx -g "daemon off;"

nginx.apimanager.conf

+20-18
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
1-
# nginx server configuration for apimanager
2-
31
server {
4-
listen 80 default_server;
5-
listen [::]:80 default_server;
6-
7-
server_name apimanager;
2+
listen 8080;
3+
server_name apimanager;
84

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+
}
1713

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+
}

0 commit comments

Comments
 (0)