File tree Expand file tree Collapse file tree 4 files changed +15
-9
lines changed Expand file tree Collapse file tree 4 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 1
1
# pull official base image
2
- FROM node:13.12.0-alpine
2
+ FROM node:13.12.0-alpine as builder
3
3
4
4
# set working directory
5
5
WORKDIR /app
@@ -13,8 +13,13 @@ COPY package-lock.json ./
13
13
14
14
RUN npm install --silent
15
15
16
+ COPY public ./public
17
+ COPY src ./src
18
+
19
+ RUN npm run build
16
20
# add app
17
- COPY . ./
21
+ FROM nginx AS host
22
+
23
+ COPY nginx-client.conf /etc/nginx/conf.d/default.conf
18
24
19
- # start app
20
- CMD ["npm" , "start" ]
25
+ COPY --from=builder /app/build/ /usr/share/nginx/html
Original file line number Diff line number Diff line change @@ -5,10 +5,10 @@ export default function About(props){
5
5
return (
6
6
< Container >
7
7
< Container style = { { "padding" :"1em" } } >
8
- < h1 > < a href = "phillypaws.org" >
8
+ < h1 > < a href = "https:// phillypaws.org/ " >
9
9
The Philadelphia Animal Welfare Society(PAWS)
10
10
</ a > </ h1 >
11
- < p > As the city’s largest animal rescue partner and no-kill animal shelter, the < a href = "phillypaws.org" > Philadelphia
11
+ < p > As the city’s largest animal rescue partner and no-kill animal shelter, the < a href = "https:// phillypaws.org/ " > Philadelphia
12
12
Animal Welfare Society (PAWS)</ a > is working to make Philadelphia a place where every healthy and treatable pet is
13
13
guaranteed a home. Since inception over 10 years ago, PAWS has rescued and placed 27,000+ animals in adoptive and
14
14
foster homes, and has worked to prevent pet homelessness by providing 86,000+ low-cost spay/neuter services and
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ services:
28
28
build : ./client
29
29
container_name : paws-compose-client
30
30
ports :
31
- - " 3000:3000 "
31
+ - " 3000:80 "
32
32
depends_on :
33
33
- server
34
34
environment :
Original file line number Diff line number Diff line change @@ -26,8 +26,9 @@ def __allowed_file(filename):
26
26
# file upload tutorial
27
27
@admin_api .route ("/api/file" , methods = ["POST" ])
28
28
def uploadCSV ():
29
+ current_app .logger .info ("Uploading CSV" )
29
30
if "file" not in request .files :
30
- return redirect ( request . url )
31
+ return jsonify ({ "error" : "no file supplied" });
31
32
32
33
for file in request .files .getlist ("file" ):
33
34
if __allowed_file (file .filename ):
@@ -38,7 +39,7 @@ def uploadCSV():
38
39
finally :
39
40
file .close ()
40
41
41
- return redirect ( "/" )
42
+ return jsonify ({ "success" : "uploaded file" });
42
43
43
44
44
45
@admin_api .route ("/api/files/<destination>" , methods = ["GET" ])
You can’t perform that action at this time.
0 commit comments