Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ RUN apt-get update && \
&& apt-get install -y nodejs \
&& mkdir -p /etc/cron.d && mv /app/setup_utils/cronjob.txt /etc/cron.d/cronjob \
&& chmod +x /app/setup_utils/start.sh /app/setup_utils/init_db.sh /app/setup_utils/generate_config_ini.sh \
&& mv ./setup_utils/supervisord.conf /etc/supervisord.conf \
&& mv /app/setup_utils/supervisord.conf /etc/supervisord.conf \
&& mv /app/database-docker/db/ /app/ && rm -rf /app/database-docker/ \
&& echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/15/main/pg_hba.conf \
&& echo "listen_addresses='*'" >> /etc/postgresql/15/main/postgresql.conf \
Expand Down
7 changes: 7 additions & 0 deletions env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ENVIRONMENT=prod
POSTGRES_DB_ENABLED=true
DB_INIT_ENABLED=true
REDIS_ENABLED=true
BACKEND_ENABLED=true
FRONTEND_ENABLED=true
CRON_ENABLED=true
5 changes: 0 additions & 5 deletions setup_utils/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,4 @@ fi

echo 'MHQ_STARTING SUPERVISOR'

if [ "$ENVIRONMENT" != "dev" ]; then
cd /app/web-server
yarn build
fi

/usr/bin/supervisord -c "/etc/supervisord.conf"
2 changes: 1 addition & 1 deletion setup_utils/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ environment=BACKEND_ENABLED=%(ENV_BACKEND_ENABLED)s
autostart=%(ENV_BACKEND_ENABLED)s

[program:frontend]
command=/bin/bash -c "yarn http"
command=/bin/bash -c "source ~/.bashrc && yarn http"
directory=/app/web-server
stdout_logfile=/var/log/webserver/webserver.log
stdout_logfile_maxbytes=512KB
Expand Down