Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
na2na-p committed Nov 4, 2022
1 parent 4b41cd0 commit e8f67d6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/built ./built
COPY --from=builder /app/package.json ./package.json

ENV NODE_ENV=production
ENV NODE_ENV=container
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["yarn", "start"]
4 changes: 2 additions & 2 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ services:
container_name: app
image: na2na/2na2-discord:main
restart: always
volumes:
- .config:/app/.config
env_file:
- ./.env
2 changes: 2 additions & 0 deletions src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ if (process.env['NODE_ENV'] !== 'container') {
log('Running in direct deployment mode. .env file loaded.');
const dotenv = await import('dotenv');
dotenv.config();
} else {
log('Running in container mode. using environment variables.');
};

export const config: configType = {
Expand Down

0 comments on commit e8f67d6

Please sign in to comment.