-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (31 loc) · 926 Bytes
/
Dockerfile
File metadata and controls
33 lines (31 loc) · 926 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM python:3.10
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
postgresql \
postgresql-client \
openssh-server \
rsync \
memcached \
&& rm -rf /var/lib/apt/lists/*
# prepare bioshare user for rsync
RUN groupadd -g 1234 bioshare
RUN useradd bioshare -u 1234 -g 1234 -m -s /bin/bash
RUN mkdir /home/bioshare/.ssh
RUN touch /home/bioshare/.ssh/authorized_keys
RUN chown -R bioshare /home/bioshare
# Set up key for rsync
RUN ssh-keygen -t rsa -N '' -f host_key
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY requirements.txt ./
RUN pip install -r requirements.txt
RUN mkdir -p /data/media /data/static
RUN ln -s /data/media
RUN ln -s /data/static
COPY ./startup.sh /tmp
RUN chmod 555 /tmp/startup.sh
COPY . .
EXPOSE 9999
ENTRYPOINT [ "/tmp/startup.sh" ]
# CMD ['gunicorn', 'dnaorder.wsgi:application', '--bind', '0.0.0.0:8000']
# CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]