Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
math_tutor_dev
public_math_tutor
Commits
2958718e
Commit
2958718e
authored
Apr 01, 2026
by
Kantz
Browse files
nginx setup
parent
22db3d83
Changes
4
Hide whitespace changes
Inline
Side-by-side
math-tutor/docker/docker-compose.yml
View file @
2958718e
services
:
services
:
nginx
:
image
:
nginx:1.27-alpine
depends_on
:
-
backend
-
frontend
ports
:
-
"
80:80"
volumes
:
-
./nginx.conf:/etc/nginx/conf.d/default.conf:ro
-
frontend-dist:/usr/share/nginx/html:ro
restart
:
unless-stopped
backend
:
backend
:
build
:
build
:
context
:
../backend
context
:
../backend
dockerfile
:
Dockerfile
dockerfile
:
Dockerfile
env_file
:
env_file
:
-
../backend/.env
-
../backend/.env
_openai
expose
:
expose
:
-
"
8000"
-
"
8000"
healthcheck
:
healthcheck
:
...
@@ -34,6 +22,8 @@ services:
...
@@ -34,6 +22,8 @@ services:
restart
:
unless-stopped
restart
:
unless-stopped
volumes
:
volumes
:
-
./logs:/app/logs
-
./logs:/app/logs
networks
:
-
web
frontend
:
frontend
:
build
:
build
:
...
@@ -41,9 +31,10 @@ services:
...
@@ -41,9 +31,10 @@ services:
dockerfile
:
Dockerfile
dockerfile
:
Dockerfile
depends_on
:
depends_on
:
-
backend
-
backend
volumes
:
-
frontend-dist:/dist
restart
:
unless-stopped
restart
:
unless-stopped
networks
:
-
web
volumes
:
networks
:
frontend-dist
:
web
:
external
:
true
math-tutor/docker/nginx.conf
deleted
100644 → 0
View file @
22db3d83
server
{
listen
80
;
server_name
_
;
root
/usr/share/nginx/html
;
index
index.html
;
location
/
{
try_files
$uri
/index.html
;
}
location
/api/
{
proxy_pass
http://backend:8000/api/
;
proxy_http_version
1
.1
;
proxy_set_header
Host
$host
;
proxy_set_header
X-Real-IP
$remote_addr
;
proxy_set_header
X-Forwarded-For
$proxy_add_x_forwarded_for
;
proxy_set_header
X-Forwarded-Proto
$scheme
;
}
}
math-tutor/frontend/Dockerfile
View file @
2958718e
FROM
node:22-alpine
AS
build
FROM
node:22-alpine
AS
build
WORKDIR
/app
WORKDIR
/app
RUN
corepack
enable
RUN
corepack
enable
COPY
package.json pnpm-lock.yaml ./
COPY
package.json pnpm-lock.yaml ./
...
@@ -10,10 +9,6 @@ RUN pnpm install --frozen-lockfile
...
@@ -10,10 +9,6 @@ RUN pnpm install --frozen-lockfile
COPY
. .
COPY
. .
RUN
pnpm run build
RUN
pnpm run build
FROM
alpine:3.20
FROM
nginx:1.27-alpine
COPY
--from=build /app/dist /usr/share/nginx/html
WORKDIR
/app
COPY
nginx.conf /etc/nginx/conf.d/default.conf
COPY
--from=build /app/dist ./dist
CMD
["sh", "-c", "mkdir -p /dist && cp -r /app/dist/. /dist/ && tail -f /dev/null"]
math-tutor/frontend/nginx.conf
0 → 100644
View file @
2958718e
server
{
listen
3000
;
server_name
_
;
root
/usr/share/nginx/html
;
index
index.html
;
location
/
{
try_files
$uri
$uri
/
/index.html
;
}
}
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment