Compare commits
1 Commits
master
...
docker_set
Author | SHA1 | Date |
---|---|---|
Armen | e4dcb89d2e |
|
@ -27,7 +27,6 @@ from sqlalchemy import or_, and_
|
||||||
from app.logic.game_support import GameSupportResolver
|
from app.logic.game_support import GameSupportResolver
|
||||||
from app.models import PackageRelease, db, Package, PackageState, PackageScreenshot, MetaPackage, User, \
|
from app.models import PackageRelease, db, Package, PackageState, PackageScreenshot, MetaPackage, User, \
|
||||||
NotificationType, PackageUpdateConfig, License, UserRank, PackageType, PackageGameSupport
|
NotificationType, PackageUpdateConfig, License, UserRank, PackageType, PackageGameSupport
|
||||||
from app.tasks.emails import send_pending_digests
|
|
||||||
from app.tasks.forumtasks import importTopicList, checkAllForumAccounts
|
from app.tasks.forumtasks import importTopicList, checkAllForumAccounts
|
||||||
from app.tasks.importtasks import importRepoScreenshot, checkZipRelease, check_for_updates
|
from app.tasks.importtasks import importRepoScreenshot, checkZipRelease, check_for_updates
|
||||||
from app.utils import addNotification, get_system_user
|
from app.utils import addNotification, get_system_user
|
||||||
|
@ -331,8 +330,3 @@ def detect_game_support():
|
||||||
resolver = GameSupportResolver()
|
resolver = GameSupportResolver()
|
||||||
resolver.update_all()
|
resolver.update_all()
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
||||||
|
|
||||||
@action("Send pending notif digests")
|
|
||||||
def do_send_pending_digests():
|
|
||||||
send_pending_digests.delay()
|
|
||||||
|
|
|
@ -17,23 +17,20 @@
|
||||||
</ul>
|
</ul>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% set other_notifications = notifications | selectattr("package", "none") %}
|
{% for group in notifications | selectattr("package", "none") %}
|
||||||
|
|
||||||
{% if other_notifications %}
|
|
||||||
<h2>
|
<h2>
|
||||||
{{ _("Other Notifications") }}
|
{{ _("Other Notifications") }}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
{% for notification in other_notifications %}
|
{% for notification in group %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ notification.url | abs_url }}">{{ notification.title }}</a> -
|
<a href="{{ notification.url | abs_url }}">{{ notification.title }}</a> -
|
||||||
{{ _("from %(username)s.", username=notification.causer.username) }}
|
{{ _("from %(username)s.", username=notification.causer.username) }}
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endfor %}
|
||||||
|
|
||||||
<p style="margin-top: 3em;">
|
<p style="margin-top: 3em;">
|
||||||
<a class="btn" href="{{ abs_url_for('notifications.list_all') }}">
|
<a class="btn" href="{{ abs_url_for('notifications.list_all') }}">
|
||||||
{{ _("View Notifications") }}
|
{{ _("View Notifications") }}
|
||||||
|
|
|
@ -0,0 +1,68 @@
|
||||||
|
version: '3'
|
||||||
|
|
||||||
|
|
||||||
|
services:
|
||||||
|
db:
|
||||||
|
image: "postgres:14.1"
|
||||||
|
volumes:
|
||||||
|
- "./data/db:/var/lib/postgresql/data"
|
||||||
|
environment: &env
|
||||||
|
- POSTGRES_USER=contentdb
|
||||||
|
- POSTGRES_PASSWORD=password
|
||||||
|
- POSTGRES_DB=contentdb
|
||||||
|
- FLASK_DEBUG=1
|
||||||
|
- FLASK_CONFIG=../config.cfg
|
||||||
|
adminer:
|
||||||
|
image: adminer
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
- ADMINER_DEFAULT_SERVER=db
|
||||||
|
- ADMINER_DESIGN=pepa-linha
|
||||||
|
ports:
|
||||||
|
- 8081:8080
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: 'redis:6.2-alpine'
|
||||||
|
command: redis-server
|
||||||
|
volumes:
|
||||||
|
- './data/redis:/data'
|
||||||
|
|
||||||
|
app:
|
||||||
|
build: .
|
||||||
|
container_name: contentdb_app_1
|
||||||
|
command: ./utils/entrypoint.sh
|
||||||
|
environment: *env
|
||||||
|
ports:
|
||||||
|
- 5123:5123
|
||||||
|
volumes:
|
||||||
|
- "./data/uploads:/var/cdb/uploads"
|
||||||
|
- "./app:/source/app"
|
||||||
|
- "./migrations:/source/migrations"
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
- redis
|
||||||
|
|
||||||
|
worker:
|
||||||
|
build: .
|
||||||
|
command: celery -A app.tasks.celery worker --concurrency 1
|
||||||
|
environment: *env
|
||||||
|
volumes:
|
||||||
|
- "./data/uploads:/var/cdb/uploads"
|
||||||
|
- "./app:/home/cdb/app"
|
||||||
|
depends_on:
|
||||||
|
- redis
|
||||||
|
|
||||||
|
beat:
|
||||||
|
build: .
|
||||||
|
command: celery -A app.tasks.celery beat
|
||||||
|
environment: *env
|
||||||
|
depends_on:
|
||||||
|
- redis
|
||||||
|
|
||||||
|
exporter:
|
||||||
|
image: ovalmoney/celery-exporter
|
||||||
|
environment: *env
|
||||||
|
ports:
|
||||||
|
- 5125:9540
|
||||||
|
depends_on:
|
||||||
|
- redis
|
|
@ -1,11 +1,17 @@
|
||||||
version: '3'
|
version: '3'
|
||||||
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
db:
|
db:
|
||||||
image: "postgres:14.1"
|
image: "postgres:14.1"
|
||||||
volumes:
|
volumes:
|
||||||
- "./data/db:/var/lib/postgresql/data"
|
- "./data/db:/var/lib/postgresql/data"
|
||||||
env_file:
|
environment: &env
|
||||||
- config.env
|
- POSTGRES_USER=contentdb
|
||||||
|
- POSTGRES_PASSWORD=password
|
||||||
|
- POSTGRES_DB=contentdb
|
||||||
|
- FLASK_DEBUG=0
|
||||||
|
- FLASK_CONFIG=../config.cfg
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: 'redis:6.2-alpine'
|
image: 'redis:6.2-alpine'
|
||||||
|
@ -15,9 +21,9 @@ services:
|
||||||
|
|
||||||
app:
|
app:
|
||||||
build: .
|
build: .
|
||||||
|
container_name: contentdb_app_1
|
||||||
command: ./utils/entrypoint.sh
|
command: ./utils/entrypoint.sh
|
||||||
env_file:
|
environment: *env
|
||||||
- config.env
|
|
||||||
ports:
|
ports:
|
||||||
- 5123:5123
|
- 5123:5123
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -31,10 +37,7 @@ services:
|
||||||
worker:
|
worker:
|
||||||
build: .
|
build: .
|
||||||
command: celery -A app.tasks.celery worker --concurrency 1
|
command: celery -A app.tasks.celery worker --concurrency 1
|
||||||
env_file:
|
environment: *env
|
||||||
- config.env
|
|
||||||
environment:
|
|
||||||
- FLASK_CONFIG=../config.cfg
|
|
||||||
volumes:
|
volumes:
|
||||||
- "./data/uploads:/var/cdb/uploads"
|
- "./data/uploads:/var/cdb/uploads"
|
||||||
- "./app:/home/cdb/app"
|
- "./app:/home/cdb/app"
|
||||||
|
@ -44,17 +47,13 @@ services:
|
||||||
beat:
|
beat:
|
||||||
build: .
|
build: .
|
||||||
command: celery -A app.tasks.celery beat
|
command: celery -A app.tasks.celery beat
|
||||||
env_file:
|
environment: *env
|
||||||
- config.env
|
|
||||||
environment:
|
|
||||||
- FLASK_CONFIG=../config.cfg
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis
|
- redis
|
||||||
|
|
||||||
exporter:
|
exporter:
|
||||||
image: ovalmoney/celery-exporter
|
image: ovalmoney/celery-exporter
|
||||||
env_file:
|
environment: *env
|
||||||
- config.env
|
|
||||||
ports:
|
ports:
|
||||||
- 5125:9540
|
- 5125:9540
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|
Loading…
Reference in New Issue