Skip to content

Commit fa544f3

Browse files
committed
Getting the front-end to build
1 parent 0af175d commit fa544f3

6 files changed

Lines changed: 15 additions & 10 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.venv/
22
**/__pycache__/
33
.idea/.DS_Store
4-
.env-api-prod
4+
.env-api-prod
5+
front-end

client/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
FROM node:latest
22

3-
WORKDIR client/
3+
WORKDIR /app
44

55
COPY . .
6+
67
RUN npm install
8+
9+
CMD npm run build

client/src/components/Alert.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import {ref} from "vue";
55
const error = ref<string>("");
66
const boxOpacity = ref<number>(1);
77
8-
let opacityTimer: NodeJS.Timeout | null = null;
9-
let endTimer: NodeJS.Timeout | null = null;
8+
let opacityTimer: ReturnType<typeof setTimeout> | null = null;
9+
let endTimer: ReturnType<typeof setTimeout> | null = null;
1010
1111
const fading = ref<string>("");
1212
const msgType = ref<string>("");

client/src/components/Visit.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<script setup lang="ts">
22
33
import {ref} from "vue";
4-
import {send} from "vite";
54
65
const props = defineProps(["visit_info"])
76
const emit = defineEmits(["close"])

compose.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ services:
22
nginx:
33
build:
44
context: ./nginx/
5+
volumes:
6+
- ./front-end:/var/www/app
57
ports:
68
- "443:443"
79
- "8010:80"
10+
811
api:
912
build:
1013
context: ./api/
@@ -21,9 +24,8 @@ services:
2124
client:
2225
build:
2326
context: ./client/
24-
ports:
25-
- "3000:3000"
26-
command: npm run dev
27+
volumes:
28+
- ./front-end:/app/dist
2729

2830
volumes:
2931
sqlite-db:

nginx/default.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ server {
1414
}
1515

1616
location / {
17-
proxy_pass http://client:3000;
18-
proxy_http_version 1.1;
17+
root /var/www/app;
18+
try_files $uri $uri/ /index.html;
1919
}
2020

2121
}

0 commit comments

Comments
 (0)