From 70d59c5b3cecb3ae434bcf5c7047e8ba2af0597f Mon Sep 17 00:00:00 2001 From: Hyunggyu Jang Date: Mon, 13 Mar 2023 22:45:02 +0900 Subject: [PATCH] Build docker files from root dir --- api/.env.example | 2 +- docker-compose.yml | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/api/.env.example b/api/.env.example index e679f6a0e0..e8c52c3b01 100644 --- a/api/.env.example +++ b/api/.env.example @@ -19,4 +19,4 @@ MONGO_URI="mongodb://127.0.0.1:27017/chatgpt-clone" # Leave blank if you don't want them. OPENAI_KEY= CHATGPT_TOKEN= -BING_TOKEN= \ No newline at end of file +BING_TOKEN= diff --git a/docker-compose.yml b/docker-compose.yml index f20d03c1e4..401055f988 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,6 +3,7 @@ version: "2" services: client: image: react-client + build: ./client restart: always ports: - "3080:80" @@ -15,13 +16,14 @@ services: - webappnetwork api: image: node-api + build: ./api restart: always + env_file: + - ./api/.env environment: - - "PORT=3080" - - "MONGO_URI=mongodb://mongodb:27017/chatgpt-clone" - - "OPENAI_KEY=" - - "CHATGPT_TOKEN=" - - "BING_TOKEN=" + - HOST=0.0.0.0 + - NODE_ENV=production + - MONGO_URI=mongodb://mongodb:27017/chatgpt-clone ports: - "9000:3080" volumes: @@ -45,4 +47,4 @@ services: networks: webappnetwork: - driver: bridge \ No newline at end of file + driver: bridge