diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index f7aff5b..0000000 --- a/Dockerfile +++ /dev/null @@ -1,36 +0,0 @@ -FROM node:20-alpine AS frontend -WORKDIR /frontend -COPY ./client . -RUN npm install -RUN npm run build - -FROM golang:1.23-alpine AS backend -WORKDIR /backend -COPY ./server . -RUN go mod tidy -RUN go build -o server - -# FROM ollama/ollama:latest AS ai - -# Install the llama3.2:1b model -# RUN ollama pull llama3.2:1b - -# Stage 4: Setup NGINX to serve the React app and reverse proxy the Go and Ollama servers -FROM nginx:alpine AS reverse_proxy - -# Copy the React build from the previous stage to NGINX's HTML folder -COPY --from=frontend /frontend/build /usr/share/nginx/html - -# Copy the Go server binary into the container -COPY --from=backend /backend/.env.production .env -COPY --from=backend /backend/server /usr/local/bin/server - -# Copy NGINX configuration to configure reverse proxy -COPY ./nginx.conf /etc/nginx/nginx.conf - -# Expose necessary ports -EXPOSE 80 -EXPOSE 8080 - -# Start NGINX and Go server in parallel (using a simple entrypoint script) -CMD ["sh", "-c", "nginx -g 'daemon off;' & /usr/local/bin/server"] diff --git a/nginx.conf b/nginx.conf deleted file mode 100644 index 3437e4c..0000000 --- a/nginx.conf +++ /dev/null @@ -1,31 +0,0 @@ -events {} - -http { - upstream backend { - server 127.0.0.1:8080; - } - - upstream ai { - server 127.0.0.1:11434; - } - - server { - listen 80; - - location / { - root /usr/share/nginx/html; - try_files $uri $uri/ /index.html; - } - - location ~* \.(?:css|js)$ { - try_files $uri/ =404; - } - - location /api/ { - proxy_pass http://backend; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - } - } -}