Compare commits
3 Commits
d59563e132
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 01cdc22a32 | |||
| e241d429d0 | |||
| 9fb64d0259 |
@@ -9,9 +9,9 @@ ENV PYTHONDONTWRITEBYTECODE 1
|
|||||||
ENV PYTHONUNBUFFERED 1
|
ENV PYTHONUNBUFFERED 1
|
||||||
|
|
||||||
COPY requirements.txt ${APP_HOME}
|
COPY requirements.txt ${APP_HOME}
|
||||||
COPY gunicorn-cfg.py ${APP_HOME}
|
#COPY gunicorn-cfg.py ${APP_HOME}
|
||||||
COPY run.sh ${APP_HOME}
|
#COPY run.sh ${APP_HOME}
|
||||||
RUN chmod +x ${APP_HOME}/run.sh
|
#RUN chmod +x ${APP_HOME}/run.sh
|
||||||
|
|
||||||
|
|
||||||
# install python dependencies
|
# install python dependencies
|
||||||
|
|||||||
@@ -36,6 +36,10 @@ services:
|
|||||||
MYSQL_DATABASE: ${MYSQL_DATABASE}
|
MYSQL_DATABASE: ${MYSQL_DATABASE}
|
||||||
MYSQL_USER: ${MYSQL_USER}
|
MYSQL_USER: ${MYSQL_USER}
|
||||||
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
|
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
|
||||||
|
volumes:
|
||||||
|
- .:/app:rw
|
||||||
|
- ./staticfiles:/app/static
|
||||||
|
- ./mediafiles:/app/media
|
||||||
command: bash -c 'cd /app && ./run.sh'
|
command: bash -c 'cd /app && ./run.sh'
|
||||||
depends_on:
|
depends_on:
|
||||||
mysql:
|
mysql:
|
||||||
|
|||||||
3
run.sh
Normal file → Executable file
3
run.sh
Normal file → Executable file
@@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
cd src &&
|
||||||
python manage.py migrate &&
|
python manage.py migrate &&
|
||||||
python manage.py fill_empty_db &&
|
python manage.py fill_empty_db &&
|
||||||
gunicorn --config gunicorn-cfg.py kalskeborec.wsgi
|
gunicorn --config ../gunicorn-cfg.py kalskeborec.wsgi
|
||||||
|
|
||||||
|
|||||||
@@ -46,32 +46,33 @@
|
|||||||
spadnete do
|
spadnete do
|
||||||
jedné z kategorií.</em></p><br>
|
jedné z kategorií.</em></p><br>
|
||||||
|
|
||||||
<div class="w3-row-padding w3-justify">
|
<div class="w3-row-padding" style="display: flex; flex-wrap: wrap;">
|
||||||
{% for category in event.categories.all %}
|
{% for category in event.categories.all %}
|
||||||
<div class="w3-col m6 w3-margin-bottom-16">
|
<div class="w3-col m6 w3-margin-bottom-16" style="display: flex;">
|
||||||
<h4 class="w3-text-purple">// {{ category.name }}</h4>
|
<div style="display: flex; flex-direction: column; width: 100%; border: 1px solid #ddd; padding: 16px;">
|
||||||
<p>
|
<h4 class="w3-text-purple">// {{ category.name }}</h4>
|
||||||
{{ category.description }}
|
<p>{{ category.description }}</p>
|
||||||
</p>
|
{% if category.length %}
|
||||||
{% if category.length %}
|
<p>Dlzka: {{ category.length }} m</p>
|
||||||
<p>Dlzka: {{ category.length }} m</p>
|
{% endif %}
|
||||||
{% endif %}
|
{% if category.climb %}
|
||||||
{% if category.climb %}
|
<p>Stoupání: {{ category.climb }} m</p>
|
||||||
<p>Stoupání: {{ category.climb }} m</p>
|
{% endif %}
|
||||||
{% endif %}
|
{% if category.gpx %}
|
||||||
{% if category.gpx %}
|
<p><a href="{{ category.gpx.url }}">GPX</a></p>
|
||||||
<p><a href="{{ category.gpx.url }}">GPX</a></p>
|
{% endif %}
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if category.mapy_cz_url %}
|
|
||||||
<iframe style="border:none" src="{{ category.mapy_cz_url }}" width="100%" height="280" frameborder="0"></iframe>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
{% empty %}
|
|
||||||
Zatím nebyly vytvořeny žádné kategorie.
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
|
<div style="margin-top: auto;">
|
||||||
|
{% if category.mapy_cz_url %}
|
||||||
|
<iframe style="border:none" src="{{ category.mapy_cz_url }}" width="100%" height="280" frameborder="0"></iframe>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
{% empty %}
|
||||||
|
<div class="w3-col s12">Zatím nebyly vytvořeny žádné kategorie.</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
Reference in New Issue
Block a user