-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from RJ-SMTR/release/staging
Release/staging
- Loading branch information
Showing
46 changed files
with
32,370 additions
and
30,977 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
FROM python:3.8-slim | ||
|
||
# Install virtualenv and create a virtual environment | ||
RUN pip install --no-cache-dir virtualenv==20.6.0 && virtualenv /env --python=python3.8 | ||
ENV PATH /env/bin:$PATH | ||
|
||
# Install pip requirements | ||
WORKDIR /app | ||
COPY requirements.txt . | ||
RUN /env/bin/pip install --no-cache-dir -r requirements.txt | ||
|
||
# Install nginx and copy configuration | ||
RUN apt-get update && apt-get install -y --no-install-recommends nginx \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
COPY mobilidade_rio_nginx.conf /etc/nginx/sites-available/default | ||
|
||
# Copy app, generate static and set permissions | ||
COPY . . | ||
RUN /env/bin/python manage.py collectstatic --no-input --settings=mobilidade_rio.settings.base && \ | ||
chown -R www-data:www-data /app | ||
|
||
# Expose and run app | ||
EXPOSE 80 | ||
STOPSIGNAL SIGTERM | ||
FROM python:3.8-slim | ||
|
||
# Install virtualenv and create a virtual environment | ||
RUN pip install --no-cache-dir virtualenv==20.6.0 && virtualenv /env --python=python3.8 | ||
ENV PATH /env/bin:$PATH | ||
|
||
# Install pip requirements | ||
WORKDIR /app | ||
COPY requirements.txt . | ||
RUN /env/bin/pip install --no-cache-dir -r requirements.txt | ||
|
||
# Install nginx and copy configuration | ||
RUN apt-get update && apt-get install -y --no-install-recommends nginx \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
COPY mobilidade_rio_nginx.conf /etc/nginx/sites-available/default | ||
|
||
# Copy app, generate static and set permissions | ||
COPY . . | ||
RUN /env/bin/python manage.py collectstatic --no-input --settings=mobilidade_rio.settings.base && \ | ||
chown -R www-data:www-data /app | ||
|
||
# Expose and run app | ||
EXPOSE 80 | ||
STOPSIGNAL SIGTERM | ||
CMD ["/app/start-server.sh"] |
Oops, something went wrong.