Compare commits

...

4 Commits

Author SHA1 Message Date
Auke Steenman
edc58e225b feat: Added docker to the frontend and backend (updated README follows soon) 2025-07-21 19:12:23 +02:00
Auke Steenman
e2be5ea5b8 fix: Updated vite config to support docker port forwarding 2025-07-21 19:11:29 +02:00
Auke Steenman
6a34c3a6c2 feat: Changed the port to 3001 of the backend server 2025-07-21 19:10:12 +02:00
Auke Steenman
cd8062052d fix: Removed postcss config (not needed as of now) 2025-07-21 19:09:35 +02:00
8 changed files with 110 additions and 12 deletions

28
.dockerignore Normal file

@ -0,0 +1,28 @@
node_modules
.pnpm
npm-debug.log
.env
.dockerignore # keep this file
.git
.gitignore
.vscode/
.idea/
*.sublime-project
*.sublime-workspace
dist/
build/
tmp/
temp/
*.log
*.zip
*.tar
*.gz
tests/
docs/
.DS_Store
Thumbs.db
__pycache__/
*.pyc
target/
*.class
fusero-backend/node_modules

11
Dockerfile Normal file

@ -0,0 +1,11 @@
FROM node:24-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install -g pnpm
RUN pnpm install
COPY . .
EXPOSE 5173
CMD ["pnpm", "run", "dev"]

24
docker-compose.yml Normal file

@ -0,0 +1,24 @@
services:
frontend:
build:
context: .
dockerfile: Dockerfile
ports:
- '5000:5173'
volumes:
- .:/app
- /app/node_modules
environment:
- PORT=5173
backend:
build:
context: ./fusero-backend
dockerfile: Dockerfile
ports:
- '3001:3001'
volumes:
- ./fusero-backend:/app/fusero-backend
- /app/fusero-backend/node_modules
environment:
- PORT=3001

@ -0,0 +1,27 @@
node_modules
.pnpm
npm-debug.log
.env
.dockerignore # keep this file
.git
.gitignore
.vscode/
.idea/
*.sublime-project
*.sublime-workspace
dist/
build/
tmp/
temp/
*.log
*.zip
*.tar
*.gz
tests/
docs/
.DS_Store
Thumbs.db
__pycache__/
*.pyc
target/
*.class

11
fusero-backend/Dockerfile Normal file

@ -0,0 +1,11 @@
FROM node:24-alpine
WORKDIR /app/fusero-backend
COPY package*.json ./
RUN npm install -g pnpm
RUN pnpm install
COPY . .
EXPOSE 3001
CMD ["pnpm", "run", "start"]

@ -1,4 +1,3 @@
import fastify from 'fastify';
const server = fastify();
@ -9,8 +8,8 @@ server.get('/', async (request, reply) => {
const start = async () => {
try {
await server.listen({ port: 3000 });
console.log('Server listening on http://localhost:3000');
await server.listen({ port: 3001 });
console.log('Server listening on http://localhost:3001');
} catch (err) {
server.log.error(err);
process.exit(1);

@ -1,6 +0,0 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};

@ -1,7 +1,11 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
})
server: {
host: '0.0.0.0',
port: 5173,
},
});