Skip to content

Commit f671d79

Browse files
committed
feat:family tree application fully implemented including UI , replationships and data management
1 parent fb4d10b commit f671d79

File tree

7,129 files changed

+842851
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

7,129 files changed

+842851
-0
lines changed

docker-compose.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
version: '3'
2+
3+
4+
services:
5+
frontend:
6+
build: ./frontend
7+
ports:
8+
- "3000:3000"
9+
depends_on:
10+
- backend
11+
environment:
12+
- REACT_APP_API_URL=http://localhost:8000
13+
14+
backend:
15+
build: ./server
16+
ports:
17+
- "8000:8000"
18+
19+
20+
21+
# version: '3'
22+
23+
# services:
24+
# backend:
25+
# build:
26+
# context: ./django
27+
# dockerfile: Dockerfile
28+
# volumes:
29+
# - ./django:/app
30+
# env_file:
31+
# - .env
32+
# expose:
33+
# - "8000"
34+
35+
# frontend:
36+
# build:
37+
# context: ./react
38+
# dockerfile: Dockerfile
39+
# expose:
40+
# - "80"
41+
42+
# nginx:
43+
# build:
44+
# context: ./nginx
45+
# ports:
46+
# - "80:80"
47+
# depends_on:
48+
# - backend
49+
# - frontend

frontend/.dockerignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules
2+
3+
build
4+
5+
Dockerfile
6+
7+

frontend/Dockerfile

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# build step
2+
FROM node:alpine
3+
WORKDIR /myapp
4+
COPY package*.json ./
5+
#COPY . .
6+
RUN npm install
7+
COPY . ./
8+
CMD [ "npm","start" ]

frontend/Dockerfile_production

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Build stage
2+
FROM node:alpine as build
3+
WORKDIR /myapp
4+
COPY package*.json ./
5+
RUN npm install
6+
COPY . ./
7+
RUN npm run build
8+
9+
# production stage
10+
11+
FROM nginx:alpine
12+
# COPY nginx.conf /etc/nginx/nginx.conf
13+
COPY --from=build /myapp/build /user/share/nginx/html/
14+
EXPOSE 80
15+
CMD ["nginx", "-g", "daemon off;"]
16+
17+
18+

frontend/nginx.conf

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
upstream app{
2+
server django:8000;
3+
}
4+
5+
server {
6+
listen 80;
7+
server_name localhost:;
8+
9+
location /api/ {
10+
proxy_pass http://backend:8000;
11+
proxy_set_header Host $host;
12+
proxy_set_header X-Real-IP $remote_addr;
13+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
14+
proxy_set_header X-Forwarded-Proto $scheme;
15+
}
16+
17+
location / {
18+
root /usr/share/nginx/html;
19+
try_files $uri /index.html;
20+
}
21+
22+
# Optionally, configure caching for static assets
23+
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
24+
expires 1d;
25+
add_header Cache-Control "public";
26+
}
27+
28+
# Error page configuration
29+
error_page 500 502 503 504 /50x.html;
30+
location = /50x.html {
31+
root /usr/share/nginx/html;
32+
}
33+
}
34+

0 commit comments

Comments
 (0)