Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Faraway committed Feb 24, 2019
1 parent bdb6289 commit f3a1171
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 18 deletions.
4 changes: 2 additions & 2 deletions Front/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM node:alpine AS build

ARG domain=https://api.bbs.hzytql.top/
# ARG domain=https://api.bbs.hzytql.top/

ADD package.json /tmp/package.json
ADD yarn.lock /tmp/yarn.lock
Expand All @@ -9,7 +9,7 @@ RUN mkdir -p /usr/src/app && cp -a /tmp/node_modules /usr/src/app

WORKDIR /usr/src/app
COPY . .
ENV DOMAIN=${domain}
# ENV DOMAIN=${domain}
RUN yarn build

FROM nginx:stable
Expand Down
32 changes: 22 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,33 @@
# UniqueBBS

- 有关环境变量
## What is this?

- SECRET=密码加盐
UniqueBBS is a modern BBS writen with `vue suite` and `prisma`.

- WXMSGTOKEN=
This is going to be used in HUST UniqueStudio as internal tool to improve experience of writing daily / weekly report, wiki, document and in-studio discusion.

- WXMSGAESKEY=
## How to deploy?

- APPID=
1. You will need docker-compose to do this deployemnt.
2. use git to clone this project into you local disk.
3. touch a `.env` file in the root dir of this project.
4. Fill this `.env` file with content like below.

- WXSECRET=
```
SECRET=XXXXXXXX
WXMSGTOKEN=XXXXXXXX
WXMSGAESKEY=XXXXXXXX
APPID=XXXXXXXX
WXSECRET=XXXXXXXX
AGENTID=XXXXXXXX
```
- AGENTID=
SECRET is the salt of password, you should pick a complex one.
- PRISMA_ENDPOINT=http://prisma:4466/
WXMSGTOKEN, WXMSGAESKEY are token and key of Work Wechat push.
- NODE_ENV=DEV
APPID, WXSECRET, AGENTID are token and key of Work Wechat login.
- BACKEND_URL=后端的外网访问地址
5. run `docker-compose build` to build images.
6. run `docker-compose up -d` to run this BBS in daemon.
7. You will get this BBS exposed at port **7010** on you machine, then you can reverse proxy this port use Nginx or Caddy to serve it.
8 changes: 2 additions & 6 deletions docker-compose.yml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ services:
build:
context: ./Front
dockerfile: Dockerfile
args:
domain: https://newbbs.hustunique.com/
# ⚠️: This is build arg, this value will be request
# endpoint of front part of UniqueBBS
bbs:
build: ./
env_file:
Expand All @@ -19,9 +15,9 @@ services:
- APPID
- WXSECRET
- AGENTID
- PRISMA_ENDPOINT
- PRISMA_ENDPOINT=http://prisma:4466/
- NODE_ENV=production
# - MODE=production
- MODE=production
- BACKEND_URL=/api/
- DOCKER_COMPOSE=true

Expand Down

0 comments on commit f3a1171

Please sign in to comment.