-
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 #7 from ronnyrules/dev
Dev
- Loading branch information
Showing
8 changed files
with
113 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
version: "3" | ||
|
||
services: | ||
app: | ||
build: | ||
context: . | ||
volumes: | ||
- static_data:/vol/web | ||
env_file: | ||
- .env | ||
environment: | ||
- SECRET_KEY=samplesecretkey123 | ||
- ALLOWED_HOSTS=127.0.0.1,localhost | ||
|
||
proxy: | ||
build: | ||
context: ./proxy | ||
volumes: | ||
- static_data:/vol/static | ||
ports: | ||
- "9090:9090" | ||
depends_on: | ||
- app | ||
|
||
db: | ||
image: mysql:latest | ||
ports: | ||
- '${SQL_PORT}:3306' | ||
restart: unless-stopped | ||
environment: | ||
MYSQL_DATABASE: ${DB_NAME} | ||
MYSQL_USER: ${DB_USER} | ||
MYSQL_PASSWORD: ${DB_PASSWORD} | ||
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD} | ||
|
||
phpmyadmin: | ||
depends_on: | ||
- db | ||
image: phpmyadmin/phpmyadmin | ||
restart: always | ||
ports: | ||
- '${PHPMYADMIN_PORT}:80' | ||
environment: | ||
PMA_HOST: db | ||
|
||
volumes: | ||
static_data: |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM nginxinc/nginx-unprivileged:1-alpine | ||
|
||
COPY ./default.conf /etc/nginx/conf.d/default.conf | ||
COPY ./uwsgi_params /etc/nginx/uwsgi_params | ||
|
||
USER root | ||
|
||
RUN mkdir -p /vol/static | ||
RUN chmod 755 /vol/static | ||
|
||
USER nginx |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
server { | ||
listen 9090; | ||
|
||
location /static { | ||
alias /vol/static; | ||
} | ||
|
||
location / { | ||
uwsgi_pass app:8000; | ||
include /etc/nginx/uwsgi_params; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
uwsgi_param QUERY_STRING $query_string; | ||
uwsgi_param REQUEST_METHOD $request_method; | ||
uwsgi_param CONTENT_TYPE $content_type; | ||
uwsgi_param CONTENT_LENGTH $content_length; | ||
uwsgi_param REQUEST_URI $request_uri; | ||
uwsgi_param PATH_INFO $document_uri; | ||
uwsgi_param DOCUMENT_ROOT $document_root; | ||
uwsgi_param SERVER_PROTOCOL $server_protocol; | ||
uwsgi_param REMOTE_ADDR $remote_addr; | ||
uwsgi_param REMOTE_PORT $remote_port; | ||
uwsgi_param SERVER_ADDR $server_addr; | ||
uwsgi_param SERVER_PORT $server_port; | ||
uwsgi_param SERVER_NAME $server_name; |
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 |
---|---|---|
|
@@ -2,4 +2,4 @@ Django>=3.0.8,<3.1.0 | |
# mysql-connector-python>=8.0.21,<8.1.0 | ||
# MySQL-python | ||
mysqlclient | ||
|
||
uWSGI>=2.0.18,<2.1 |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
python manage.py collectstatic --noinput | ||
|
||
uwsgi --socket :8000 --master --enable-threads --module app.wsgi |