Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
proxy-manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
aolda
proxy-manager
Commits
b22a6616
Commit
b22a6616
authored
4 weeks ago
by
asitis
Browse files
Options
Downloads
Patches
Plain Diff
fix: Nginx 권한 문제로 인한 캐싱 오류 수정
parent
fc0387dd
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Dockerfile
+1
-1
1 addition, 1 deletion
Dockerfile
rootfs/docker-entrypoint.sh
+26
-8
26 additions, 8 deletions
rootfs/docker-entrypoint.sh
rootfs/etc/nginx/nginx.conf
+1
-1
1 addition, 1 deletion
rootfs/etc/nginx/nginx.conf
with
28 additions
and
10 deletions
Dockerfile
+
1
−
1
View file @
b22a6616
...
...
@@ -14,7 +14,7 @@ RUN pnpm run build
FROM
nginx:stable-alpine
RUN
apk add
--no-cache
fcgiwrap spawn-fcgi
RUN
apk add
--no-cache
fcgiwrap spawn-fcgi
shadow
COPY
rootfs/ /
COPY
--from=build /app/dist /app/frontend
...
...
This diff is collapsed.
Click to expand it.
rootfs/docker-entrypoint.sh
+
26
−
8
View file @
b22a6616
#!/bin/sh
set
-e
PUID
=
${
PUID
:-
1000
}
PGID
=
${
PGID
:-
1000
}
if
getent group nginx
>
/dev/null
;
then
if
[
"
$(
id
-g
nginx
)
"
-ne
"
$PGID
"
]
;
then
groupmod
-o
-g
"
$PGID
"
nginx
fi
else
addgroup
-S
-g
"
$PGID
"
nginx
fi
if
getent passwd nginx
>
/dev/null
;
then
if
[
"
$(
id
-u
nginx
)
"
-ne
"
$PUID
"
]
||
[
"
$(
id
-g
nginx
)
"
-ne
"
$PGID
"
]
;
then
usermod
-o
-u
"
$PUID
"
-g
"
$PGID
"
nginx
fi
else
adduser
-S
-u
"
$PUID
"
-G
nginx
-H
-D
nginx
fi
# Create necessary directories
mkdir
-p
/data/custom_ssl /data/logs /data/access /data/nginx /data/letsencrypt-acme-challenge /data/nginx/default_host /data/nginx/default_www /data/nginx/proxy_host /data/nginx/redirection_host /data/nginx/stream /data/nginx/dead_host /data/nginx/temp
mkdir
-p
/etc/letsencrypt /run/nginx /tmp/nginx/body /var/log/nginx /var/lib/nginx/cache/public /var/lib/nginx/cache/private /var/cache/nginx/proxy_temp
mkdir
-p
/var/run
# Set proper permissions
chown
-R
${
PUID
:-
1000
}
:
${
PGID
:-
1000
}
/data
chown
-R
${
PUID
:-
1000
}
:
${
PGID
:-
1000
}
/etc/letsencrypt
chown
-R
${
PUID
:-
1000
}
:
${
PGID
:-
1000
}
/run/nginx
chown
-R
${
PUID
:-
1000
}
:
${
PGID
:-
1000
}
/tmp/nginx
chown
-R
${
PUID
:-
1000
}
:
${
PGID
:-
1000
}
/var/cache/nginx
chown
-R
${
PUID
:-
1000
}
:
${
PGID
:-
1000
}
/var/lib/nginx
chown
-R
${
PUID
:-
1000
}
:
${
PGID
:-
1000
}
/var/log/nginx
chown
-R
${
PUID
:-
1000
}
:
${
PGID
:-
1000
}
/var/run
chown
-R
"
$PUID
:
$PGID
"
/data
chown
-R
"
$PUID
:
$PGID
"
/etc/letsencrypt
chown
-R
"
$PUID
:
$PGID
"
/run/nginx
chown
-R
"
$PUID
:
$PGID
"
/tmp/nginx
chown
-R
"
$PUID
:
$PGID
"
/var/cache/nginx
chown
-R
"
$PUID
:
$PGID
"
/var/lib/nginx
chown
-R
"
$PUID
:
$PGID
"
/var/log/nginx
spawn-fcgi
-s
/var/run/fcgiwrap.socket
-M
766 /usr/bin/fcgiwrap &
exec
"
$@
"
This diff is collapsed.
Click to expand it.
rootfs/etc/nginx/nginx.conf
+
1
−
1
View file @
b22a6616
# Run nginx in foreground
# daemon off;
pid
/run/nginx/nginx.pid
;
#
user nginx;
user
nginx
nginx
;
# Set number of worker processes automatically based on number of CPU cores.
worker_processes
auto
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment