Commit
·
c52e388
1
Parent(s):
4d6528c
feat: Add Dockerfile and update GitHub Actions workflow
Browse files- .github/workflows/main.yml +4 -4
- Dockerfile +40 -0
.github/workflows/main.yml
CHANGED
@@ -10,10 +10,10 @@ jobs:
|
|
10 |
sync-to-hub:
|
11 |
runs-on: ubuntu-latest
|
12 |
steps:
|
13 |
-
- name: Checkout
|
14 |
uses: actions/checkout@v3
|
15 |
with:
|
16 |
-
ref:
|
17 |
fetch-depth: 0
|
18 |
lfs: true
|
19 |
|
@@ -57,7 +57,7 @@ jobs:
|
|
57 |
|
58 |
## Development
|
59 |
|
60 |
-
This Space is automatically updated via GitHub Actions from the repository. The
|
61 |
|
62 |
## License
|
63 |
|
@@ -72,4 +72,4 @@ jobs:
|
|
72 |
git config --global user.name "GitHub Actions"
|
73 |
git add README.md
|
74 |
git commit -m "Update README for Hugging Face Space"
|
75 |
-
git push --force https://mantrakp:[email protected]/spaces/mantrakp/sheer
|
|
|
10 |
sync-to-hub:
|
11 |
runs-on: ubuntu-latest
|
12 |
steps:
|
13 |
+
- name: Checkout main branch
|
14 |
uses: actions/checkout@v3
|
15 |
with:
|
16 |
+
ref: main
|
17 |
fetch-depth: 0
|
18 |
lfs: true
|
19 |
|
|
|
57 |
|
58 |
## Development
|
59 |
|
60 |
+
This Space is automatically updated via GitHub Actions from the repository. The main branch is directly pushed to this Space.
|
61 |
|
62 |
## License
|
63 |
|
|
|
72 |
git config --global user.name "GitHub Actions"
|
73 |
git add README.md
|
74 |
git commit -m "Update README for Hugging Face Space"
|
75 |
+
git push --force https://mantrakp:[email protected]/spaces/mantrakp/sheer main:main
|
Dockerfile
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use the official Ubuntu base image
|
2 |
+
FROM ubuntu:latest
|
3 |
+
|
4 |
+
# Set environment variables
|
5 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
6 |
+
|
7 |
+
# Install necessary packages
|
8 |
+
RUN apt-get update && apt-get install -y \
|
9 |
+
curl \
|
10 |
+
git \
|
11 |
+
build-essential \
|
12 |
+
&& rm -rf /var/lib/apt/lists/*
|
13 |
+
|
14 |
+
# Install Bun
|
15 |
+
RUN curl -fsSL https://bun.sh/install | bash
|
16 |
+
|
17 |
+
# Add Bun to PATH
|
18 |
+
ENV PATH="/root/.bun/bin:$PATH"
|
19 |
+
|
20 |
+
# Create and set working directory
|
21 |
+
WORKDIR /app
|
22 |
+
|
23 |
+
# Copy package.json and package-lock.json
|
24 |
+
COPY package.json ./
|
25 |
+
COPY bun.lock ./
|
26 |
+
|
27 |
+
# Install dependencies
|
28 |
+
RUN bun install
|
29 |
+
|
30 |
+
# Copy the rest of the application code
|
31 |
+
COPY . .
|
32 |
+
|
33 |
+
# Build the application
|
34 |
+
RUN bun run build
|
35 |
+
|
36 |
+
# Expose the port the app runs on
|
37 |
+
EXPOSE 3000
|
38 |
+
|
39 |
+
# Command to run the application
|
40 |
+
CMD bun run preview
|