Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
postavka_front
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Нұрасыл Қайратұлы
postavka_front
Commits
3dd9ec3e
Commit
3dd9ec3e
authored
Jun 20, 2025
by
Нұрасыл Қайратұлы
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix port expose
parent
2edf7e8b
Pipeline
#844
failed with stages
in 9 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
2 deletions
+69
-2
Dockerfile
Dockerfile
+16
-2
nginx.conf
nginx.conf
+53
-0
No files found.
Dockerfile
View file @
3dd9ec3e
...
...
@@ -7,7 +7,21 @@ RUN npm install
COPY
. .
RUN
npm run build
RUN
npm
install
-g
serve
# Этап создания финального образа с Nginx
FROM
nginx:alpine
# Удаляем стандартные файлы Nginx
RUN
rm
-rf
/usr/share/nginx/html/
*
# Копируем сгенерированные файлы React из предыдущего этапа
COPY
--from=build /app/dist /usr/share/nginx/html
# Копируем конфигурацию Nginx
COPY
nginx.conf /etc/nginx/nginx.conf
# Открываем порт 80 для доступа к приложению
EXPOSE
80
CMD
["serve", "-s", "dist", "-l", "80"]
\ No newline at end of file
# Запускаем Nginx
CMD
["nginx", "-g", "daemon off;"]
\ No newline at end of file
nginx.conf
0 → 100644
View file @
3dd9ec3e
http
{
server
{
server_tokens
off
;
listen
8080
;
root
/usr/share/nginx/html
;
include
/etc/nginx/mime.types
;
location
/
{
try_files
$uri
$uri
/
/index.html
;
}
gzip
on
;
gzip_vary
on
;
gzip_http_version
1
.0
;
gzip_comp_level
5
;
gzip_types
application/javascript
application/json
application/xml
font/opentype
image/svg
+xml
text/css
text/plain
gzip_proxied
no-cache
no-store
private
expired
auth
;
gzip_min_length
256
;
gunzip
on
;
}
}
events
{}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment