Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docker configurable user #800

Merged
merged 4 commits into from
Jan 25, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix(docker): Improved flexibility by enabling custom users with the D…
…ocker 'user' directive. The previous implementation restricted this to the 'node' user
jorenn92 committed Jan 25, 2024
commit f1798314d6a77f3e367862966552e6d27143a382
2 changes: 1 addition & 1 deletion server/src/app/config/typeOrmConfig.ts
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ const ormConfig: TypeOrmModuleOptions = {
subscribers: ['./**/*.subscriber{.ts,.js}'],
migrations:
process.env.NODE_ENV === 'production'
? ['/opt/server/database/migrations/**/*{.js,.ts}']
? ['/opt/app/server/database/migrations/**/*{.js,.ts}']
: ['./dist/database/migrations/**/*{.js,.ts}'],
autoLoadEntities: true,
migrationsRun: true,
2 changes: 1 addition & 1 deletion server/src/main.ts
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@ async function bootstrap() {
new DailyRotateFile({
filename: path.join(
__dirname,
`${process.env.NODE_ENV !== 'production' ? '../' : ''}../data/logs/maintainerr-%DATE%.log`,
`../../data/logs/maintainerr-%DATE%.log`,
),
datePattern: 'YYYY-MM-DD',
zippedArchive: true,
8 changes: 4 additions & 4 deletions supervisord.conf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[supervisord]
nodaemon=true
logfile=/opt/data/supervisord.log
logfile=/opt/data/logs/supervisord.log
pidfile=/tmp/supervisord.pid
logfile_maxbytes=20971520
user=node

[program:server]
command=yarn node /opt/server/main.js
command=yarn node /opt/app/server/main.js
autorestart=true
startretries=100
stdout_logfile=/dev/fd/1
@@ -14,7 +14,7 @@ redirect_stderr=true

[program:ui]
environment=PORT=80
command=yarn node /opt/ui/server.js
command=yarn node /opt/app/ui/server.js
autorestart=true
startretries=100
stdout_logfile=/dev/fd/1