chore: update docker-compose.yml

This commit is contained in:
chenos 2021-04-17 22:21:06 +08:00
parent d5d0e1036b
commit 95640ec57c
4 changed files with 27 additions and 10 deletions

View File

@ -2,8 +2,8 @@
DB_MYSQL_PORT=3306
DB_POSTGRES_PORT=5432
API_PORT=23000
VERDACCIO_PORT=4873
APP_PORT=23001
########## NOCOBASE ENV ##########

View File

@ -1,13 +1,15 @@
FROM node:12.20.0-stretch
WORKDIR /app
COPY . /app
# COPY . /app
RUN ls -a
RUN npm config set registry https://registry.npm.taobao.org
RUN npm install
RUN npm run bootstrap
RUN npm run build
RUN yarn config set registry https://registry.npm.taobao.org
# RUN npm install
# RUN npm run bootstrap
# RUN npm run build
# # Install app dependencies
# ENV NPM_CONFIG_LOGLEVEL warn

View File

@ -1,12 +1,12 @@
version: "3"
networks:
node-network:
nocobase:
driver: bridge
services:
verdaccio:
image: verdaccio/verdaccio
networks:
- node-network
- nocobase
environment:
VERDACCIO_PORT: ${VERDACCIO_PORT}
restart: always
@ -23,16 +23,31 @@ services:
ports:
- "${DB_MYSQL_PORT}:3306"
networks:
- node-network
- nocobase
postgres:
image: postgres:10
restart: always
ports:
- "${DB_POSTGRES_PORT}:5432"
networks:
- node-network
- nocobase
command: postgres -c wal_level=logical
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_DB: ${DB_DATABASE}
POSTGRES_PASSWORD: ${DB_PASSWORD}
nocobase:
build:
context: .
dockerfile: Dockerfile
networks:
- nocobase
command: [ "yarn", "start" ]
working_dir: /app
env_file: ./.env
volumes:
- ./:/app
expose:
- 8000
ports:
- "${APP_PORT}:8000"

View File

@ -45,7 +45,7 @@
"react-image-lightbox": "^5.1.1",
"react-sortable-hoc": "^1.11.0",
"react-to-print": "^2.12.3",
"styled-components": "^5.2.1",
"styled-components": "^4.1.1",
"umi": "^3.2.23",
"yorkie": "^2.0.0"
},