Skip to content

Commit 5f8fdf9

Browse files
committed
feat: Add support for docker deploy
1 parent c30a117 commit 5f8fdf9

File tree

4 files changed

+71
-1
lines changed

4 files changed

+71
-1
lines changed

.dockerignore

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
.yarn/install-state.gz
8+
9+
# testing
10+
/coverage
11+
12+
# next.js
13+
/.next/
14+
/out/
15+
16+
# production
17+
/build
18+
19+
# misc
20+
.DS_Store
21+
*.pem
22+
23+
# debug
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
27+
28+
# local env files
29+
.env*.local
30+
.env
31+
32+
# vercel
33+
.vercel
34+
35+
# typescript
36+
*.tsbuildinfo
37+
next-env.d.ts
38+
39+
.idea
40+
41+
public/
42+
Dockerfile
43+
docker-compose.yml
44+
README*.md

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ yarn-error.log*
2727

2828
# local env files
2929
.env*.local
30+
.env
3031

3132
# vercel
3233
.vercel
@@ -35,4 +36,4 @@ yarn-error.log*
3536
*.tsbuildinfo
3637
next-env.d.ts
3738

38-
.idea
39+
.idea

Dockerfile

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# syntax=docker/dockerfile:1
2+
3+
FROM node:lts-alpine AS builder
4+
WORKDIR /src
5+
COPY package*.json ./
6+
RUN npm install
7+
COPY . .
8+
RUN npm run build
9+
10+
FROM node:lts-alpine
11+
WORKDIR /app
12+
COPY package*.json ./
13+
RUN npm install --only=production
14+
COPY --from=builder /src/.next ./.next
15+
EXPOSE 3000
16+
CMD ["npm", "run", "start"]

docker-compose.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: '3'
2+
3+
services:
4+
suno-api:
5+
build: .
6+
volumes:
7+
- ./public:/app/public
8+
ports:
9+
- "3000:3000"

0 commit comments

Comments
 (0)