This file contains hidden or 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
echo killing old docker processes | |
docker-compose rm -fs | |
echo building docker containers | |
docker-compose up --build -d |
This file contains hidden or 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
echo killing old docker processes | |
docker-compose rm -fs | |
echo building docker containers | |
docker-compose up --build -d |
This file contains hidden or 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
version: '3' | |
services: | |
flask_app: | |
container_name: flask_app | |
restart: always | |
build: ./flask_app | |
ports: | |
- "8000:8000" | |
command: gunicorn -w 1 -b 0.0.0.0:8000 wsgi:server |
This file contains hidden or 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
flask | |
gunicorn |
This file contains hidden or 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
server { | |
listen 80; | |
server_name docker_flask_gunicorn_nginx; | |
location / { | |
proxy_pass http://flask_app:8000; | |
# Do not change this | |
proxy_set_header Host $host; |
This file contains hidden or 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
FROM nginx:1.15.8 | |
RUN rm /etc/nginx/nginx.conf | |
COPY nginx.conf /etc/nginx/ | |
RUN rm /etc/nginx/conf.d/default.conf | |
COPY project.conf /etc/nginx/conf.d/ |
This file contains hidden or 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
FROM nginx:1.15.8 | |
RUN rm /etc/nginx/nginx.conf | |
COPY nginx.conf /etc/nginx/ | |
RUN rm /etc/nginx/conf.d/default.conf | |
COPY project.conf /etc/nginx/conf.d/ |
This file contains hidden or 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
server { | |
listen 80; | |
server_name docker_flask_gunicorn_nginx; | |
location / { | |
proxy_pass http://flask_app:8000; | |
# Do not change this | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; |
This file contains hidden or 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
server { | |
listen 80; | |
server_name docker_flask_gunicorn_nginx; | |
location / { | |
proxy_pass http://flask_app:8000; | |
# Do not change this | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; |
This file contains hidden or 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
# Define the user that will own and run the Nginx server | |
user nginx; | |
# Define the number of worker processes; recommended value is the number of | |
# cores that are being used by your server | |
worker_processes 1; | |
# Define the location on the file system of the error log, plus the minimum | |
# severity to log messages for | |
error_log /var/log/nginx/error.log warn; | |
# Define the file that will store the process ID of the main NGINX process | |
pid /var/run/nginx.pid; |