Compare commits

..

2 Commits

Author SHA1 Message Date
69fd92dc77 🔥 rm venv 2020-12-26 14:36:55 +01:00
d39405a7e4 File restructuration 2020-12-26 14:36:31 +01:00
9 changed files with 23 additions and 7 deletions

13
server/Pipfile Executable file
View File

@ -0,0 +1,13 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
email = "*"
bottle = "*"
[requires]
python_version = "3.6"

View File

@ -1,5 +1,5 @@
set -e
version=2.0.1
version=2.1.0
docker build -t jeancloud/contact-mailer:latest -t jeancloud/contact-mailer:$version .
docker push jeancloud/contact-mailer:latest
docker push jeancloud/contact-mailer:$version

View File

@ -2,11 +2,11 @@ version: '3'
services:
db:
image: mongo
mailer:
build: ..
build: ../server
volumes:
- ../main.py:/usr/src/app/main.py
- ../server/main.py:/usr/src/app/main.py
- ./uwsgi:/tmp/uwsgi
depends_on:
- db
@ -19,7 +19,10 @@ services:
SMTP_SERVER_SENDER: moi
ADMIN_PASSWORD: admin
SMTP_SSL: 'true'
proxy:
image: nginx
ports:
- 8080:8080
volumes:
- ./nginx.conf:/etc/nginx.conf

View File

@ -22,17 +22,17 @@ http {
server {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, DELETE, OPTIONS';
listen 8008;
listen 8080;
location /admin {
root /home/ilya/git/contact_mailer/adminer;
index index.html;
}
location / {
root /home/ilya/git/contact_mailer;
root /home/ilya/git/contact_mailer/test;
index test.html;
}
location /api/ {
proxy_pass http://localhost:8080/;
proxy_pass http://mailer:8080/;
}
}
}