Skip to content

Commit

Permalink
Fix permission denied of nginx (apache#2375)
Browse files Browse the repository at this point in the history
* fix: fix permission denied of nginx

changed bind port to 4000 from 80 for no root permission.

Nddtfjiang <zhicheng.jiang@merico.dev>

* fix: change export port

change export port 80,443 to 4000,4443

Nddtfjiang <zhicheng.jiang@merico.dev>

* fix: deployments and service config-ui port change

changed deployments and service config-ui port

Nddtfjiang <zhicheng.jiang@merico.dev>
  • Loading branch information
mappjzc committed Jun 29, 2022
1 parent adbce68 commit bc0edae
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion config-ui/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ COPY ./nginx.conf /etc/nginx/conf.d/default.conf.tpl
WORKDIR /usr/share/nginx/html
RUN rm -rf ./*
COPY --from=builder /home/node/code/dist/. ./
EXPOSE 80 443
EXPOSE 4000 4443
RUN apt update && apt install -y apache2-utils
COPY ./nginx.sh /usr/bin/nginx.sh
RUN chmod +x /usr/bin/nginx.sh
Expand Down
2 changes: 1 addition & 1 deletion config-ui/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
server {
listen 80;
listen 4000;
server_name localhost;
${SERVER_CONF}

Expand Down
2 changes: 1 addition & 1 deletion deployment/helm/templates/deployments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ spec:
image: "{{ .Values.ui.image.repository }}:{{ .Values.ui.image.tag }}"
imagePullPolicy: {{ .Values.ui.image.pullPolicy }}
ports:
- containerPort: 80
- containerPort: 4000
envFrom:
- configMapRef:
name: {{ include "devlake.fullname" . }}-config
Expand Down
2 changes: 1 addition & 1 deletion deployment/helm/templates/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ spec:
- protocol: TCP
name: ui
port: {{ .Values.service.uiPort }}
targetPort: 80
targetPort: 4000
{{- if eq .Values.service.type "NodePort" }}
nodePort: {{ .Values.service.uiPort }}
{{- end }}
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ services:
build:
context: "config-ui"
ports:
- 127.0.0.1:4000:80
- 127.0.0.1:4000:4000
env_file:
- ./.env
environment:
Expand Down
4 changes: 2 additions & 2 deletions k8s-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ spec:
- name: config-ui
image: mericodev/config-ui:latest
ports:
- containerPort: 80
- containerPort: 4000
envFrom:
- configMapRef:
name: devlake-config
Expand All @@ -163,7 +163,7 @@ spec:
ports:
- protocol: TCP
port: 4000
targetPort: 80
targetPort: 4000
nodePort: 30004

---
Expand Down

0 comments on commit bc0edae

Please sign in to comment.