deeme commited on
Commit
71ef8e1
1 Parent(s): c17a997

Upload 2 files

Browse files
Files changed (2) hide show
  1. Dockerfile +37 -0
  2. README.md +10 -10
Dockerfile ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM node:20
2
+
3
+ ARG DEBIAN_FRONTEND=noninteractive
4
+
5
+ RUN apt-get update && apt-get install -y git
6
+
7
+ # Set home to the user's home directory
8
+ ENV HOME=/home/user \
9
+ PATH=/home/user/.local/bin:$PATH
10
+
11
+ # Set up a new user named "user" with user ID 1000
12
+ RUN useradd -o -u 1000 user && mkdir -p $HOME/app && chown -R user $HOME
13
+
14
+ # Switch to the "user" user
15
+ USER user
16
+
17
+ # Set the working directory to the user's home directory
18
+ WORKDIR $HOME/app
19
+
20
+
21
+ # 克隆 项目到 /workspace/app 目录下
22
+ RUN git clone https://github.com/deeme/comic.git ./
23
+
24
+ # Copy the current directory contents into the container at $HOME/app setting the owner to the user
25
+ COPY --chown=user . $HOME/app/
26
+
27
+ RUN if [ ! -f ".next/routes-manifest.json" ]; then \
28
+ npm install && npm run build; \
29
+ fi
30
+
31
+ RUN rm -rf src
32
+
33
+ EXPOSE 3000
34
+
35
+ ENV PORT 3000
36
+
37
+ CMD npm start
README.md CHANGED
@@ -1,10 +1,10 @@
1
- ---
2
- title: Comic
3
- emoji:
4
- colorFrom: gray
5
- colorTo: yellow
6
- sdk: docker
7
- pinned: false
8
- ---
9
-
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
+ ---
2
+ title: Comic
3
+ emoji: 👩‍🎨
4
+ colorFrom: red
5
+ colorTo: yellow
6
+ sdk: docker
7
+ pinned: false
8
+ app_port: 3000
9
+ ---
10
+