Skip to content

Commit a091456

Browse files
authored
Merge pull request #314 from CodeForPhilly/uwsgi_user
Add a 'paws' user to secure web server
2 parents f0dd3cd + d497a19 commit a091456

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/server/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,8 @@ RUN chmod +x bin/startServer.sh
4141
# RUN ufw allow 5000
4242
WORKDIR /app
4343

44+
RUN useradd -m pawsapp
45+
USER pawsapp
46+
4447
CMD bin/startServer.sh
4548
#>> start.log 2>&1

src/server/bin/startServer.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ echo "SLEEPING.. WAITING FOR DB"; sleep 5; echo "WAKING"; alembic upgrade head;
1111

1212
# --no-reload prevents Flask restart, which usually happens in middle of create_base_users()
1313
#TODO: SECURITY - ensure we are not running in debug mode in production
14-
uwsgi --http-socket :5000 --plugin python38 --module wsgi:app --chdir /app --pythonpath . --processes 2 --threads 4
14+
uwsgi --http-socket :5000 --plugin python38 --module wsgi:app --chdir /app --pythonpath . --processes 2 --threads 4 --master

0 commit comments

Comments
 (0)