ci(docker): add env port to dockerfile, use port env instead of server_port

This commit is contained in:
Amruth Pillai 2022-03-07 23:52:39 +01:00
parent 2696a54d17
commit d79997d380
No known key found for this signature in database
GPG Key ID: E3C57DF9B80855AD
4 changed files with 7 additions and 3 deletions

View File

@ -3,8 +3,8 @@ TZ=UTC
SECRET_KEY=change-me
# URLs
PUBLIC_APP_URL=https://localhost:3000
PUBLIC_SERVER_URL=https://localhost:3100
PUBLIC_APP_URL=http://localhost:3000
PUBLIC_SERVER_URL=http://localhost:3100
# Database
POSTGRES_HOST=localhost

View File

@ -46,4 +46,6 @@ RUN pnpm install -F client --frozen-lockfile --prod
EXPOSE 3000
ENV PORT 3000
CMD [ "pnpm", "run", "start:client" ]

View File

@ -42,4 +42,6 @@ RUN pnpm install -F server --frozen-lockfile --prod
EXPOSE 3100
ENV PORT 3100
CMD [ "pnpm", "run", "start:server" ]

View File

@ -4,7 +4,7 @@ export default registerAs('app', () => ({
timezone: process.env.TZ,
environment: process.env.NODE_ENV,
secretKey: process.env.SECRET_KEY,
port: parseInt(process.env.SERVER_PORT, 10) || 3100,
port: parseInt(process.env.PORT, 10) || 3100,
url: process.env.PUBLIC_APP_URL || 'http://localhost:3000',
serverUrl: process.env.PUBLIC_SERVER_URL || 'http://localhost:3100',
}));