fix: specify the env file path

This commit is contained in:
chenos 2021-03-30 17:01:13 +08:00
parent 996e87daa7
commit 50f1d1853b
5 changed files with 3176 additions and 3947 deletions

View File

@ -5,7 +5,6 @@ networks:
services: services:
verdaccio: verdaccio:
image: verdaccio/verdaccio image: verdaccio/verdaccio
container_name: "verdaccio"
networks: networks:
- node-network - node-network
environment: environment:
@ -41,13 +40,3 @@ services:
POSTGRES_USER: ${DB_USER} POSTGRES_USER: ${DB_USER}
POSTGRES_DB: ${DB_DATABASE} POSTGRES_DB: ${DB_DATABASE}
POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_PASSWORD: ${DB_PASSWORD}
app:
build:
context: .
dockerfile: Dockerfile
command: [ "yarn", "start" ]
ports:
- "${APP_HTTP_PORT}:${APP_HTTP_PORT}"
- "${HTTP_PORT}:${HTTP_PORT}"
networks:
- node-network

View File

@ -15,7 +15,9 @@ const sync = global.sync || {
console.log('process.env.NOCOBASE_ENV', process.env.NOCOBASE_ENV); console.log('process.env.NOCOBASE_ENV', process.env.NOCOBASE_ENV);
dotenv.config(); dotenv.config({
path: path.resolve(__dirname, '../../../.env'),
});
const api = Api.create({ const api = Api.create({
database: { database: {

View File

@ -1,4 +1,12 @@
import { defineConfig } from 'umi'; import { defineConfig } from 'umi';
import dotenv from 'dotenv';
import path from 'path';
dotenv.config({
path: path.resolve(__dirname, '../../.env'),
});
console.log('process.env.API_PORT', process.env.API_PORT);
export default defineConfig({ export default defineConfig({
title: false, title: false,

View File

@ -24,6 +24,7 @@
"@ant-design/pro-layout": "^5.0.12", "@ant-design/pro-layout": "^5.0.12",
"@formily/antd-components": "^1.3.6", "@formily/antd-components": "^1.3.6",
"@lourenci/react-kanban": "^2.1.0", "@lourenci/react-kanban": "^2.1.0",
"@nocobase/client": "^0.4.0-alpha.0",
"@types/react-big-calendar": "^0.24.8", "@types/react-big-calendar": "^0.24.8",
"@umijs/preset-react": "1.x", "@umijs/preset-react": "1.x",
"@umijs/test": "^3.2.23", "@umijs/test": "^3.2.23",

7099
yarn.lock

File diff suppressed because it is too large Load Diff