diff --git a/docker-compose.yml b/docker-compose.yml index 8d1c8b6..01c2c0d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1 +1,42 @@ - +services: + backend: + build: + context: backend + restart: unless-stopped + ports: + - "8000" + env_file: + - path: ./env/backend/prod.env + required: true + volumes: + - ./backend/app:/code/app:z + depends_on: + postgres: + condition: service_healthy + nginx: + build: + dockerfile: ./nginx/Dockerfile + restart: unless-stopped + volumes: + - ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro + - ./static:/static + depends_on: + - backend + ports: + - "80:80" + postgres: + image: postgres:16.2-alpine + restart: unless-stopped + ports: + - "5432:5432" + volumes: + - ./postgres_data:/var/lib/postgresql/data/ + env_file: + - path: ./env/postgres.env + required: true + healthcheck: + test: + ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} --user $${POSTGRES_USER}"] + interval: 2s + timeout: 2s + retries: 5 diff --git a/env/backend/prod.env b/env/backend/prod.env index e69de29..529f782 100644 --- a/env/backend/prod.env +++ b/env/backend/prod.env @@ -0,0 +1,3 @@ +POSTGRES_USER=user +POSTGRES_PASSWORD=password +POSTGRES_DB=db \ No newline at end of file diff --git a/env/frontend/prod.env b/env/frontend/prod.env index e69de29..c6d302f 100644 --- a/env/frontend/prod.env +++ b/env/frontend/prod.env @@ -0,0 +1,5 @@ +CI=true +PORT=3000 +HOST=0.0.0.0 +WDS_SOCKET_PORT=0 +REACT_APP_DOMAIN=127.0.0.1 \ No newline at end of file diff --git a/frontend/app/src/config/translationMap.json b/frontend/app/src/config/translationMap.json index 3d97e7e..3976c03 100644 --- a/frontend/app/src/config/translationMap.json +++ b/frontend/app/src/config/translationMap.json @@ -64,5 +64,8 @@ }, "Dashboard": { "ru": "Панель управления" + }, + "Page not found": { + "ru": "Страница не найдена" } } \ No newline at end of file diff --git a/frontend/app/src/pages/NotFoundPage.tsx b/frontend/app/src/pages/NotFoundPage.tsx index 00520ef..260c061 100644 --- a/frontend/app/src/pages/NotFoundPage.tsx +++ b/frontend/app/src/pages/NotFoundPage.tsx @@ -9,7 +9,8 @@ const NotFoundPage = () => {