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 set -e
version=2.0.1 version=2.1.0
docker build -t jeancloud/contact-mailer:latest -t jeancloud/contact-mailer:$version . docker build -t jeancloud/contact-mailer:latest -t jeancloud/contact-mailer:$version .
docker push jeancloud/contact-mailer:latest docker push jeancloud/contact-mailer:latest
docker push jeancloud/contact-mailer:$version docker push jeancloud/contact-mailer:$version

View File

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

View File

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