Skip to content

Commit f2e6f70

Browse files
authored
Merge pull request #762 from liangliangyy/dev
修改目录结构
2 parents 31df13e + 2ac84af commit f2e6f70

File tree

7 files changed

+23
-21
lines changed

7 files changed

+23
-21
lines changed

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ RUN apt-get update && \
66
rm -rf /var/lib/apt/lists/*
77
ADD requirements.txt requirements.txt
88
RUN pip install --upgrade pip && \
9-
pip install --no-cache-dir -r requirements.txt && \
9+
pip install --no-cache-dir -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple && \
1010
pip install --no-cache-dir gunicorn[gevent] && \
1111
pip cache purge
1212

1313
ADD . .
14-
RUN chmod +x /code/djangoblog/bin/docker_start.sh
15-
ENTRYPOINT ["/code/djangoblog/bin/docker_start.sh"]
14+
RUN chmod +x /code/djangoblog/deploy/entrypoint.sh
15+
ENTRYPOINT ["/code/djangoblog/deploy/entrypoint.sh"]
File renamed without changes.

docker-compose.yml renamed to deploy/docker-compose/docker-compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ services:
1616
container_name: db
1717

1818
djangoblog:
19-
build: .
19+
build:
20+
context: ../../
2021
restart: always
2122
command: bash -c 'sh /code/djangoblog/bin/docker_start.sh'
2223
ports:

bin/docker_start.sh renamed to deploy/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ python manage.py makemigrations && \
1818
python manage.py collectstatic --noinput && \
1919
python manage.py compress --force && \
2020
python manage.py build_index && \
21-
python manage.py compilemessages
21+
python manage.py compilemessages || exit 1
2222

2323
exec gunicorn ${DJANGO_WSGI_MODULE}:application \
2424
--name $NAME \
File renamed without changes.

requirements.txt

0 Bytes
Binary file not shown.

templates/share_layout/base.html

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
href='{% static 'blog/fonts/fonts.css' %}'
3232
type='text/css' media='all'/>
3333
<link rel="dns-prefetch" href="//cdn.mathjax.org"/>
34+
<link rel="shortcut icon" href="favorite.ico" type="image/x-icon"/>
3435
{% compress css %}
3536

3637
<link rel='stylesheet' id='twentytwelve-style-css' href='{% static 'blog/css/style.css' %}' type='text/css'
@@ -61,22 +62,22 @@ <h2 class="site-description">{{ SITE_DESCRIPTION }}</h2>
6162
{% load i18n %}
6263

6364

64-
{# <div class="i18n-selector">#}
65-
{# <form action="{% url 'set_language' %}" method="post" id="i18n-form">{% csrf_token %}#}
66-
{# <input name="next" type="hidden" value="{{ redirect_to }}">#}
67-
{# <select name="language" class="i18n-select" >#}
68-
{# {% get_current_language as LANGUAGE_CODE %}#}
69-
{# {% get_available_languages as LANGUAGES %}#}
70-
{# {% get_language_info_list for LANGUAGES as languages %}#}
71-
{# {% for language in languages %}#}
72-
{# <option value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected{% endif %}>#}
73-
{# {{ language.name_local }} ({{ language.code }})#}
74-
{# </option>#}
75-
{# {% endfor %}#}
76-
{# </select>#}
77-
{# <input type="submit" value="Go">#}
78-
{# </form>#}
79-
{# </div>#}
65+
{# <div class="i18n-selector">#}
66+
{# <form action="{% url 'set_language' %}" method="post" id="i18n-form">{% csrf_token %}#}
67+
{# <input name="next" type="hidden" value="{{ redirect_to }}">#}
68+
{# <select name="language" class="i18n-select" >#}
69+
{# {% get_current_language as LANGUAGE_CODE %}#}
70+
{# {% get_available_languages as LANGUAGES %}#}
71+
{# {% get_language_info_list for LANGUAGES as languages %}#}
72+
{# {% for language in languages %}#}
73+
{# <option value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected{% endif %}>#}
74+
{# {{ language.name_local }} ({{ language.code }})#}
75+
{# </option>#}
76+
{# {% endfor %}#}
77+
{# </select>#}
78+
{# <input type="submit" value="Go">#}
79+
{# </form>#}
80+
{# </div>#}
8081

8182

8283
{% include 'share_layout/nav.html' %}

0 commit comments

Comments
 (0)