diff --git a/backend/Dockerfile b/backend/Dockerfile
index 70ae6ac6..6afeb70c 100644
--- a/backend/Dockerfile
+++ b/backend/Dockerfile
@@ -1,20 +1,11 @@
 FROM golang:1.21 as build
-
 WORKDIR /dist
 COPY . .
-
-# Adjust the ARCH if needed - eg amd64 or arm64v8
 ENV GOARCH=amd64 CGO_ENABLED=0
-
 RUN go mod download
-
-# Build the binary
 RUN go build -v -o app ./main.go && chmod +x app
 
 FROM alpine:latest as production
-
 COPY --from=build /dist /usr/bin
-
 EXPOSE 80
-
 CMD ["app", "serve", "-port=80"]
\ No newline at end of file
diff --git a/compose.yaml b/compose.yaml
index 3ea0e597..71cd502c 100644
--- a/compose.yaml
+++ b/compose.yaml
@@ -5,6 +5,7 @@ services:
     build:
       context: ./frontend
       dockerfile: Dockerfile
+      target: develop
     depends_on:
       - app
     ports:
diff --git a/frontend/Dockerfile b/frontend/Dockerfile
index 3d06f6d7..bbbffa86 100644
--- a/frontend/Dockerfile
+++ b/frontend/Dockerfile
@@ -1,11 +1,17 @@
-FROM node:21.6-alpine3.18
-
-WORKDIR /app
-
+FROM node:21.6-alpine3.18 AS base
+WORKDIR /opt/app
 COPY . .
-
 RUN npm install
 
+FROM base AS develop
 EXPOSE 3000
+CMD ["npm", "run", "dev", '--host']
 
-CMD npm run dev --host
\ No newline at end of file
+FROM base as build
+RUN npm run build
+
+FROM base as production
+WORKDIR /opt/app
+COPY --from=build /opt/app/.output .
+EXPOSE 3000
+CMD ["node", "./server/index.mjs"]