Docker #3

Merged
ParkSuMin merged 8 commits from Docker into master 2026-01-03 18:46:21 +01:00
3 changed files with 25 additions and 1 deletions
Showing only changes of commit 8c9ea53964 - Show all commits

4
Dockerfile.client Normal file
View File

@@ -0,0 +1,4 @@
FROM nginx:1.27-alpine
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
COPY public /usr/share/nginx/html

19
docker/nginx.conf Normal file
View File

@@ -0,0 +1,19 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
location /api/ {
proxy_pass http://server:3000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location / {
try_files $uri $uri/ /index.html;
}
}

View File

@@ -4,8 +4,9 @@ import { randomUUID } from "crypto";
import DBAdapter, { getCurrentDate, setCurrentDate } from "./db/database.js";
import { DB_INTERNAL_ERROR, DB_USER_ERROR } from "./db/database.js";
// Switch to .env for test in local machine
dotenv.config({
path: './server/.env'
path: './server/docker.env'
});
const {