feat: 新增 docker-compose.yml

feat: 新增 docker-compose.yml
This commit is contained in:
lanyulei 2022-07-01 09:30:53 +08:00 committed by GitHub
commit 49862a7d74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 0 deletions

View File

@ -11,6 +11,7 @@ RUN git clone https://gitee.com/yllan/ferry_web.git
WORKDIR ferry_web
RUN npm install -g cnpm --registry=https://registry.npmmirror.com
RUN npm uninstall node-sass && npm i -D sass --registry=https://registry.npmmirror.com
RUN cnpm install
RUN echo $'# just a flag\n\
ENV = \'production\'\n\n\

31
docker-compose.yml Normal file
View File

@ -0,0 +1,31 @@
version: '3'
services:
ferry_mysql:
image: mysql:8
container_name: ferry_mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: '123456'
MYSQL_DATABASE: 'ferry'
MYSQL_USER: 'ferry'
MYSQL_PASSWORD: '123456'
ferry_redis:
container_name: ferry_redis
image: redis:latest
restart: unless-stopped
command: redis-server --save 60 1 --loglevel warning
ferry:
image: ferry:latest
container_name: ferry
restart: unless-stopped
depends_on:
- ferry_mysql
- ferry_redis
ports:
- "8002:8002"
volumes:
- ./config:/opt/workflow/ferry/config