Skip to content

Commit

Permalink
[fix] Docker configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
TechQuery committed Dec 23, 2023
1 parent ae28c7c commit 39b69e6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ COPY . /app
WORKDIR /app

FROM base AS prod-deps
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm i -P --frozen-lockfile --ignore-scripts
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm i -P --frozen-lockfile

FROM base AS build
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm i --frozen-lockfile
Expand Down
6 changes: 5 additions & 1 deletion config/server.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
export default ({ env }) => ({
host: env('HOST', '0.0.0.0'),
port: env.int('PORT', 1337),
url: env('SERVER_URL', 'http://localhost:1337'),
url:
process.env.NODE_ENV !== 'development'
? env('SERVER_URL')
: 'http://localhost:1337',
proxy: true,
app: {
keys: env.array('APP_KEYS'),
},
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ services:
- postgres-server
image: ohp/strapi-server
environment:
- SERVER_URL=https://hackathon-server.kaiyuanshe.cn
- DATABASE_CLIENT=postgres
- DATABASE_URL=postgres://postgres:${ADMIN_JWT_SECRET}@postgres-server:5432/postgres
- NODE_ENV=production
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ohp/web-server",
"version": "0.10.0",
"version": "0.14.0",
"private": true,
"engines": {
"node": ">=18.0.0 <=20.x.x",
Expand Down

0 comments on commit 39b69e6

Please sign in to comment.