mirror of
https://github.com/hazemKrimi/touch-programming.git
synced 2026-05-01 18:20:26 +00:00
Temporarily remove deployment config
This commit is contained in:
-36
@@ -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"]
|
|
||||||
-31
@@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user