-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1e9d8f0
commit 4a13983
Showing
4 changed files
with
76 additions
and
2 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,35 @@ | ||
version: "3.8" | ||
|
||
services: | ||
web: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
volumes: | ||
- ./videos:/app/exports | ||
user: thekid | ||
ports: | ||
- "5000:5000" | ||
environment: | ||
- FLASK_APP=bereal.server | ||
depends_on: | ||
- redis | ||
|
||
celery: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
volumes: | ||
- ./videos:/app/exports | ||
user: thekid | ||
command: celery -A bereal.celery worker --loglevel=INFO --logfile=celery.log -E | ||
environment: | ||
- FLASK_APP=bereal.server | ||
depends_on: | ||
- web | ||
- redis | ||
|
||
redis: | ||
image: "redis:alpine" | ||
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
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,24 @@ | ||
server { | ||
listen 80; | ||
server_name api.bereal.michaeldemar.co; | ||
|
||
return 301 https://$host$request_uri; | ||
} | ||
|
||
server { | ||
listen 443 ssl; | ||
server_name api.bereal.michaeldemar.co; | ||
|
||
# SSL configuration | ||
ssl_certificate /fullchain.pem; | ||
ssl_certificate_key /privkey.pem; | ||
|
||
# web and port are from the service's definition in docker-compose | ||
location / { | ||
proxy_pass http://web:5000; | ||
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; | ||
} | ||
} |