Compare commits
10 commits
d8bd75003b
...
0f8842dd56
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f8842dd56 | ||
|
|
d8b7b08eef | ||
|
|
0aada0f1d6 | ||
|
|
906a1474e5 | ||
|
|
f7734c2643 | ||
|
|
f7f2cf643e | ||
|
|
8a5c06edac | ||
|
|
4e72133fe2 | ||
|
|
6cd864bbb1 | ||
|
|
10be7092e3 |
8 changed files with 188 additions and 117 deletions
13
README.md
Normal file
13
README.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
### Useful intel
|
||||
|
||||
Nginx reverse proxy installed on the remote server
|
||||
- forwards requests to docker-compose powered python app
|
||||
- serves static content found in /var/www/sciodog.fr/
|
||||
|
||||
SSL is setup using certbot
|
||||
|
||||
Docker-compose app is in /home/Zoe/sciodog
|
||||
|
||||
Quick restart: `docker compose down; docker compose up -d`
|
||||
Project update: `docker compose down; docker rmi sciodog-sciodog; docker compose up -d`
|
||||
|
||||
|
|
@ -6,7 +6,11 @@ services:
|
|||
environment:
|
||||
WSGI_FILE: "sciodog.wsgi"
|
||||
HOSTNAME: "sciodog.fr"
|
||||
PORT: 80
|
||||
PORT: 8000
|
||||
volumes:
|
||||
- /var/www/sciodog.fr/:/var/www/sciodog.fr:rw
|
||||
ports:
|
||||
- "8000:8000"
|
||||
restart: always
|
||||
healthcheck:
|
||||
test: "wget -O/dev/null -q http://127.0.0.1/"
|
||||
|
|
|
|||
42
nginx/default
Normal file
42
nginx/default
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
server {
|
||||
|
||||
root /var/www/sciodog.fr;
|
||||
|
||||
index index.html index.htm index.nginx-debian.html;
|
||||
|
||||
server_name sciodog.fr;
|
||||
|
||||
location / {
|
||||
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_pass http://localhost:8000;
|
||||
}
|
||||
|
||||
location /static/ {
|
||||
root /var/www/sciodog.fr/blog/;
|
||||
}
|
||||
|
||||
listen [::]:443 ssl ipv6only=on; # managed by Certbot
|
||||
listen 443 ssl; # managed by Certbot
|
||||
ssl_certificate /etc/letsencrypt/live/sciodog.fr/fullchain.pem; # managed by Certbot
|
||||
ssl_certificate_key /etc/letsencrypt/live/sciodog.fr/privkey.pem; # managed by Certbot
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
||||
|
||||
}
|
||||
server {
|
||||
if ($host = sciodog.fr) {
|
||||
return 301 https://$host$request_uri;
|
||||
} # managed by Certbot
|
||||
|
||||
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
server_name sciodog.fr;
|
||||
return 404; # managed by Certbot
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -7,7 +7,7 @@ FROM alpine:latest
|
|||
# UWSGI Configuration
|
||||
COPY configuration/ /etc/uwsgi/
|
||||
RUN mkdir -p /etc/uwsgi ; \
|
||||
adduser uwsgi -S -D -H -s /usr/sbin/nologin ; \
|
||||
adduser uwsgi -S -D -H -s /usr/sbin/nologin -u 33; \
|
||||
apk add python3 python3-dev py3-pip gcc musl-dev linux-headers ; \
|
||||
pip install --break-system-packages uwsgi django
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 9.7 KiB |
0
sciodog-app/app/blog/static/blog/images/carousel/logo-radio-flam.png
Executable file → Normal file
0
sciodog-app/app/blog/static/blog/images/carousel/logo-radio-flam.png
Executable file → Normal file
|
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 92 KiB |
|
|
@ -74,7 +74,7 @@
|
|||
<div class="row justify-content-center">
|
||||
<div id="recipeCarousel" class="carousel slide" data-bs-ride="carousel">
|
||||
<div class="carousel-inner" role="listbox">
|
||||
<div class="carousel-item active">
|
||||
<div class="carousel-item active align-items-center">
|
||||
<div class="col-md-3 p-2">
|
||||
<a href="https://www.francebleu.fr/cotentin">
|
||||
<div class="card p-2">
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
<div class="carousel-item align-items-center">
|
||||
<div class="col-md-3 p-2">
|
||||
<a href="https://vetobricquebec.fr/">
|
||||
<div class="card p-2">
|
||||
|
|
@ -93,23 +93,21 @@
|
|||
<img src="{% static 'blog/images/carousel/clinique.png' %}" class="img-fluid">
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="carousel-item">
|
||||
<div class="carousel-item align-items-center">
|
||||
<div class="col-md-3 p-2">
|
||||
<a href="https://www.tomandco.com/fr-fr/Nos-magasins/#!/l/cherbourg-en-cotentin/260-rue-du-grand-pre/3793999">
|
||||
<div class="card p-2">
|
||||
<div class="card-img" style="max-height=250px">
|
||||
<img src="{% static 'blog/images/carousel/les_cotentinois_500.png' %}" class="img-fluid">
|
||||
</div>
|
||||
</div></a>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="carousel-item">
|
||||
<div class="carousel-item align-items-center">
|
||||
<div class="col-md-3 p-2">
|
||||
<a href="https://www.radioflam.fr/">
|
||||
<div class="card p-2">
|
||||
|
|
@ -120,6 +118,17 @@
|
|||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="carousel-item align-items-center">
|
||||
<div class="col-md-3 p-2">
|
||||
<a href="https://www.quimper-commerces.bzh/commerce/jmt-quimper">
|
||||
<div class="card p-2">
|
||||
<div class="card-img">
|
||||
<img src="{% static 'blog/images/carousel/logo-jmt-quimper.png' %}" class="img-fluid" style="margin-top: auto; margin-bottom: auto;">
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -177,6 +186,9 @@
|
|||
<img src="{% static 'blog/images/LinkedIn_logo.png' %}" width="40" height="40"
|
||||
alt="logo LinkedIn"/>
|
||||
</a>
|
||||
<a href="https://www.proxianimaux.fr/">
|
||||
<img src="https://www.proxianimaux.fr/ressources/images/logo.png" alt="proxianimaux" width="160" style="max-width: 160px;" />
|
||||
</a>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class IndexView(View):
|
|||
params = {
|
||||
'access_token': access_token
|
||||
}
|
||||
url = 'https://graph.facebook.com/v13.0/102786409210660/feed?fields=attachments,message,permalink_url&limit=10'
|
||||
url = 'https://graph.facebook.com/v13.0/102786409210660/posts?fields=attachments,message,permalink_url&limit=10'
|
||||
response = requests.get(url, params=params)
|
||||
posts = []
|
||||
if response.status_code == 200:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue