Skip to content

Commit

Permalink
Create user
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosribas committed May 8, 2024
1 parent 4512a77 commit b891158
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,13 @@ ENV \
PYTHONDONTWRITEBYTECODE=1 \
HOME="/srv/rfam-batch-search"

# create folders and set work directory
# create folders
RUN mkdir -p $HOME && mkdir /var/log/gunicorn

# create user
RUN useradd -m -d $HOME -s /bin/bash rfam

# set work directory
WORKDIR $HOME

# install requirements
Expand All @@ -38,6 +43,10 @@ RUN pip install --no-cache-dir -r requirements.txt

# copy project
COPY . .
RUN chown -R rfam:rfam /srv && chown -R rfam:rfam /var/log/gunicorn

# set user
USER rfam

# run the FastAPI app
CMD [ "gunicorn", "-c", "gunicorn/gunicorn_conf.py", "-b", "0.0.0.0:8000", "main:app"]

0 comments on commit b891158

Please sign in to comment.