-
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.
Added: Redis configuration & Preconfigure nginx already (#3)
* Remove timeout parameter * Add Redis service to docker-compose.yml and update requirements.txt * Remove unused requirements.txt * Add Docker Compose file for deployment and Nginx configuration
- Loading branch information
1 parent
13cace1
commit 9329eae
Showing
7 changed files
with
62 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
version: '3.8' | ||
|
||
services: | ||
brazil-blog-web: | ||
container_name: brazil-blog | ||
build: . | ||
command: bash -c "python manage.py migrate && python manage.py bootstrap && python manage.py runserver 0.0.0.0:8000" | ||
environment: | ||
- DJANGO_SUPERUSER_USERNAME=${DJANGO_SUPERUSER_USERNAME} | ||
- DJANGO_SUPERUSER_PASSWORD=${DJANGO_SUPERUSER_PASSWORD} | ||
- DJANGO_SUPERUSER_EMAIL=${DJANGO_SUPERUSER_EMAIL} | ||
volumes: | ||
- ./src:/code | ||
ports: | ||
- 8000:8000 | ||
|
||
nginx: | ||
image: nginx:latest | ||
ports: | ||
- "80:80" | ||
volumes: | ||
- ./nginx:/etc/nginx/conf.d | ||
depends_on: | ||
- brazil-blog-web | ||
|
||
redis: | ||
image: redis:latest | ||
ports: | ||
- "6379:6379" | ||
|
||
volumes: | ||
redis_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 |
---|---|---|
|
@@ -12,4 +12,9 @@ services: | |
volumes: | ||
- ./src:/code | ||
ports: | ||
- 8000:8000 | ||
- 8000:8000 | ||
|
||
redis: | ||
image: redis:latest | ||
ports: | ||
- "6379:6379" |
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 @@ | ||
server { | ||
listen 80; | ||
|
||
location / { | ||
proxy_pass http://brazil-blog-web:8000; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
} | ||
} |
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,3 +1,4 @@ | ||
Django | ||
wagtail>=6.0 | ||
django-allauth | ||
django-allauth | ||
django-redis |
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 was deleted.
Oops, something went wrong.