From a0843a46b252dfeee6af0045468cbd97119a24ce Mon Sep 17 00:00:00 2001 From: Tobias Hopp Date: Tue, 15 Apr 2025 16:33:22 +0200 Subject: [PATCH] Fix Dockerfile --- Dockerfile | 8 ++++---- docker-compose.traefik.yml | 3 +++ docker-compose.yml | 3 +++ frontend/index.html | 10 +++++----- frontend/src/App.tsx | 2 +- 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 29edec8..e458bbf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,14 +33,14 @@ RUN yarn run build # Final stage -FROM node:22 -COPY --from=frontend-builder /frontend/dist/ /app/frontend/dist -COPY --from=backend-builder /app/dist /app/dist +FROM node:22-slim +COPY --from=frontend-builder /frontend/dist/ frontend/dist +COPY --from=backend-builder /app/dist/ dist/ +COPY --from=backend-builder /app/node_modules node_modules COPY package.json . ENV PORT=80 ENV MONGODB_URI=mongodb://db:27017/friendship-network -ENV JWT_SECRET=7hPqh6pS91WCQY ENV APP_URL=http://localhost:80 ENV ENABLE_REGISTRATION=true diff --git a/docker-compose.traefik.yml b/docker-compose.traefik.yml index d5f8074..0780889 100644 --- a/docker-compose.traefik.yml +++ b/docker-compose.traefik.yml @@ -4,6 +4,9 @@ networks: traefik: external: true +volumes: + db: + services: relnet: image: ghcr.io/philipredstone/relnet:latest diff --git a/docker-compose.yml b/docker-compose.yml index 1c37ea0..06ba5be 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,6 +2,9 @@ networks: internal: internal: true +volumes: + db: + services: relnet: image: ghcr.io/philipredstone/relnet:latest diff --git a/frontend/index.html b/frontend/index.html index 4ef752a..3eb38d5 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -1,11 +1,11 @@ - - - Relnet - - + + + Relnet + +
diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 6d735be..ac7ea11 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -5,7 +5,7 @@ import { NetworkProvider } from './context/NetworkContext'; import Login from './components/auth/Login'; import Register from './components/auth/Register'; import NetworkList from './components/networks/NetworkList'; -import FriendshipNetwork from './components/FriendshipNetwork'; // Your existing component +import FriendshipNetwork from './components/FriendshipNetwork'; import Header from './components/layout/Header'; // Protected route component