forked from LeeHanYeong/WPS-6th-Instagram
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (28 loc) · 1011 Bytes
/
Copy pathDockerfile
File metadata and controls
36 lines (28 loc) · 1011 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
34
35
36
FROM azelf/base
MAINTAINER dev@azelf.com
ENV LANG C.UTF-8
COPY . /srv/app
RUN /root/.pyenv/versions/app/bin/pip install -r \
/srv/app/requirements.txt
# pyenv local설정
WORKDIR /srv/app
RUN pyenv local app
# Nginx
RUN cp /srv/app/.config/nginx/nginx.conf \
/etc/nginx/nginx.conf
RUN cp /srv/app/.config/nginx/app.conf \
/etc/nginx/sites-available/
RUN rm -rf /etc/nginx/sites-enabled/*
RUN ln -sf /etc/nginx/sites-available/app.conf \
/etc/nginx/sites-enabled/app.conf
# uWSGI
RUN mkdir -p /var/log/uwsgi/app
# manage.py
WORKDIR /srv/app/instagram
RUN /root/.pyenv/versions/app/bin/python manage.py collectstatic --noinput
RUN /root/.pyenv/versions/app/bin/python manage.py migrate --noinput
# supervisor
RUN cp /srv/app/.config/supervisor/* \
/etc/supervisor/conf.d/
CMD supervisord -n
EXPOSE 80