Skip to content

Commit

Permalink
build: update docker build process
Browse files Browse the repository at this point in the history
  • Loading branch information
yy4382 committed Apr 21, 2024
1 parent 4e7857c commit 626ed7d
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ vercel.json
app.json
heroku.yml
Dockerfile
README.md
README.md
docker-compose.yml
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ on:
branches: [ master ]

env:
DOCKER_REPOSITORY: wxxxcxx/ms-ra-forwarder
DOCKER_REPOSITORY: yunfinibol/ms-ra-forwarder-for-ifreetime

jobs:
build:
runs-on: ubuntu-latest
if: github.repository == 'wxxxcxx/ms-ra-forwarder'
if: github.repository == 'yy4382/ms-ra-forwarder-for-ifreetime'
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
11 changes: 10 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:slim
FROM node:slim as builder

WORKDIR /app

Expand All @@ -7,6 +7,15 @@ RUN npm install
COPY ./ ./
RUN npm run build

FROM node:slim as production

WORKDIR /app

COPY ./package*.json ./
RUN npm install --production

COPY ./public ./public
COPY --from=builder /app/dist ./dist
ENV TOKEN= PORT=3000

EXPOSE $PORT
Expand Down
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: '3'

services:
ifreetimeTTS:
container_name: ifreetimeTTS
image: yunfinibol/ms-ra-forwarder-for-ifreetime
restart: unless-stopped
ports:
- "3000:3000"
# 如果可以保持自己的ip或者完整域名不公开的话,可以不用设置环境变量
environment: []
#需要的话把上边一行注释,下面两行取消注释
#environment:
# - TOKEN=自定义TOKEN

0 comments on commit 626ed7d

Please sign in to comment.