summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d9f3ffa)
* Using nginx alpine for server
* Using flask template inheritance
driver: overlay
services:
navigator:
driver: overlay
services:
navigator:
- image: cjpalmer/gallery-navigator:1.6.0
+ image: cjpalmer/gallery-navigator:1.7.0
volumes:
- gallery_data:/app/gallery
networks:
- backend
server:
volumes:
- gallery_data:/app/gallery
networks:
- backend
server:
- image: cjpalmer/gallery-server:1.6.0
+ image: cjpalmer/gallery-server:1.7.0
volumes:
- gallery_data:/data/images
depends_on:
volumes:
- gallery_data:/data/images
depends_on:
services:
navigator:
build: ./navigator
services:
navigator:
build: ./navigator
- image: cjpalmer/gallery-navigator:1.6.0
+ image: cjpalmer/gallery-navigator:1.7.0
volumes:
- ./navigator/app:/app # dev testing
- gallery_data_dev:/app/gallery
volumes:
- ./navigator/app:/app # dev testing
- gallery_data_dev:/app/gallery
FLASK_DEBUG: 1
server:
build: ./server
FLASK_DEBUG: 1
server:
build: ./server
- image: cjpalmer/gallery-server:1.6.0
+ image: cjpalmer/gallery-server:1.7.0
volumes:
- gallery_data_dev:/data/images
ports:
volumes:
- gallery_data_dev:/data/images
ports:
--- /dev/null
+<!DOCTYPE html>
+<head>
+ <title>{% block title %}{% endblock %}</title>
+ <link rel="stylesheet" href="{{ url_for('static', filename='css/colors.css') }}">
+ <link rel="stylesheet" href="{{ url_for('static', filename='css/index.css') }}">
+</head>
+<body class="first-color">
+ <div class="titlecard second-color">
+ {% block content %}{% endblock %}
+ </div>
+</body>
+</html>
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <title>{{ title }}</title>
- <link rel="stylesheet" type="text/css" href="static/css/colors.css" />
- <link rel="stylesheet" type="text/css" href="static/css/index.css" />
-</head>
-<body class="first-color">
- <div class="titlecard second-color">
- <h1>{{ title }}</h1>
+{% extends 'base.html' %}
- <ul class="card third-color" id="navigation">
- {% for gallery in galleries %}
- <li class="link fourth-color">
- <a href="{{ gallery }}">{{ gallery }}</a>
- </li>
- {% endfor %}
- </ul>
- </div>
-</body>
-</html>
+{% block title %}
+{{ title }}
+{% endblock %}
+
+{% block content %}
+<h1>{{ title }}</h1>
+
+<ul class="card third-color" id="navigation">
+{% for gallery in galleries %}
+ <li class="link fourth-color">
+ <a href="{{ gallery }}">{{ gallery }}</a>
+ </li>
+{% endfor %}
+</ul>
+{% endblock %}
<head>
<title>{{ title }}</title>
</head>
<head>
<title>{{ title }}</title>
</head>
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <title>{{ title }}</title>
- <link rel="stylesheet" type="text/css" href="static/css/colors.css" />
- <link rel="stylesheet" type="text/css" href="static/css/index.css" />
-</head>
-<body class="first-color">
- <div class="titlecard second-color">
+{% extends 'base.html' %}
- {% if header %}
- <div class="card third-color">
- {% autoescape false %}
- {{ header }}
- {% endautoescape %}
- </div>
- {% endif %}
+{% block title %}
+{{ title }}
+{% endblock %}
- <ul class="card third-color" id="navigation">
- {% for page in pages %}
- <li class="link fourth-color">
- <a href="{{ gallery }}/{{ page.number }}">{{ page.number }}</a>
- </li>
- {% endfor %}
- </ul>
- </div>
-</body>
-</html>
+{% block content %}
+{% if header %}
+<div class="card third-color">
+{% autoescape false %}
+{{ header }}
+{% endautoescape %}
+</div>
+{% endif %}
+
+<ul class="card third-color" id="navigation">
+{% for page in pages %}
+ <li class="link fourth-color">
+ <a href="{{ gallery }}/{{ page.number }}">{{ page.number }}</a>
+ </li>
+{% endfor %}
+{% endblock %}
-COPY ./nginx.conf /etc/nginx/nginx.conf
+COPY ./default.conf /etc/nginx/conf.d/default.conf
--- /dev/null
+server {
+ location / {
+ proxy_pass http://navigator:5000;
+ }
+
+ location /images {
+ root /data;
+ }
+}
+++ /dev/null
-worker_processes auto;
-
-events {
- worker_connections 1024;
-}
-
-http {
- server {
- location / {
- proxy_pass http://navigator:5000;
- }
-
- location /images {
- root /data;
- }
- }
-}