Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
ajs_19_lesson100
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
Анамария Морено
ajs_19_lesson100
Commits
063e6f9b
Commit
063e6f9b
authored
Mar 11, 2025
by
Анамария Морено
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add docker compose yaml
parent
16479f2d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
0 deletions
+60
-0
Dockerfile
Dockerfile
+1
-0
docker-compose.yml
docker-compose.yml
+18
-0
nginx.conf
nginx.conf
+41
-0
No files found.
Dockerfile
View file @
063e6f9b
...
...
@@ -7,5 +7,6 @@ EXPOSE 3000
CMD
["npm", "start"]
FROM
nginx:1.23.3-alpine
COPY
nginx.conf /etc/nginx/nginx.conf
EXPOSE
80
EXPOSE
443
\ No newline at end of file
docker-compose.yml
0 → 100644
View file @
063e6f9b
version
:
"
3.9"
services
:
nextjs
:
image
:
nextjs:latest
container_name
:
nextjs
ports
:
-
"
3000:3000"
restart
:
always
nginx
:
image
:
nginx:latest
container_name
:
nginx
ports
:
-
"
80:80"
-
"
443:443"
volumes
:
-
/etc/ssl:/etc/nginx/ssl:ro
restart
:
always
nginx.conf
0 → 100644
View file @
063e6f9b
events
{
}
http
{
upstream
nextjs
{
server
nextjs
:
3000
;
}
server
{
# Redirect HTTP requests to HTTPS.
listen
80
;
server_name
localhost
;
root
/srv/public
;
return
301
https://
$host$request_uri
;
}
server
{
listen
443
ssl
;
server_name
localhost
;
root
/srv/public
;
server_tokens
off
;
ssl_certificate
/etc/nginx/ssl/my_ssl_cert.crt
;
ssl_certificate_key
/etc/nginx/ssl/my_ssl_key.key
;
location
/
{
try_files
$uri
$uri
/
@nextjs
;
}
location
@nextjs
{
proxy_set_header
X-Forwarded-For
$proxy_add_x_forwarded_for
;
proxy_set_header
X-Forwarded-Proto
https
;
proxy_set_header
X-Forwarded-Ssl
on
;
proxy_set_header
Host
$http_host
;
proxy_redirect
off
;
proxy_pass
http://nextjs
;
proxy_cookie_path
/
"/
;
HTTPOnly
;
Secure"
;
}
}
}
\ 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