Skip to content

Commit 74ddbdf

Browse files
authored
chore(docker): fix host binding in container (#399)
Use prebuild image from ghcr and match working directory in dockerfile
1 parent dbef81d commit 74ddbdf

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
FROM node:16-alpine
22

3+
ENV API_HOST=0.0.0.0
34
WORKDIR /app
45
COPY . .
56

docker-compose.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
version: '3'
22
services:
33
app:
4-
build:
5-
context: .
6-
dockerfile: ./Dockerfile
4+
# build:
5+
# context: .
6+
# dockerfile: ./Dockerfile
7+
image: ghcr.io/waylaidwanderer/node-chatgpt-api:latest
8+
restart: unless-stopped
79
environment:
810
- OPENAI_API_KEY=${OPENAI_API_KEY}
911
volumes:
10-
- ./settings.js:/var/chatgpt-api/settings.js:cached
12+
- ./settings.js:/app/settings.js:cached
1113
ports:
1214
- '${APP_PORT:-3000}:3000'

0 commit comments

Comments
 (0)