[extensions-web/wip/ne0sight: 4/4] docker-compose: simplified configuration, added phpMyAdmin
- From: Yuri Konotopov <ykonotopov src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web/wip/ne0sight: 4/4] docker-compose: simplified configuration, added phpMyAdmin
- Date: Mon, 9 May 2022 18:07:13 +0000 (UTC)
commit d0c8f029fa208dbfafb345d55c0ea1260cf726f2
Author: Yuri Konotopov <ykonotopov gnome org>
Date: Mon May 9 22:07:08 2022 +0400
docker-compose: simplified configuration, added phpMyAdmin
README.rst | 19 ++-------
openshift/docker/docker-compose.yml | 84 ++++++++++++++++++++++++++-----------
2 files changed, 64 insertions(+), 39 deletions(-)
---
diff --git a/README.rst b/README.rst
index fe543fb..c8e087d 100644
--- a/README.rst
+++ b/README.rst
@@ -3,15 +3,14 @@ SweetTooth-Web
==============
**SweetTooth-Web** is a Django-powered web application that, in co-operation
-with some GNOME Shell integration helper (deprecated `NPAPI plugin`_ or `Browser extension`_)
+with some GNOME Shell integration helper (`Browser extension`_)
allows users to install, upgrade and enable/disable their own Shell Extensions.
All operations with the Shell are done through a special helper which proxies
-over to the Shell by DBus. Please note that `NPAPI plugin`_ is deprecated and was removed from GNOME Shell
codebase.
+over to the Shell by DBus.
Since extensions can be dangerous, all extensions uploaded to the repository
must go through code review and testing.
-.. _NPAPI plugin: https://gitlab.gnome.org/GNOME/gnome-shell/tree/gnome-3-30/browser-plugin
.. _Browser extension: https://gitlab.gnome.org/GNOME/chrome-gnome-shell/
Requirements
@@ -19,7 +18,7 @@ Requirements
System Requirements:
- * `python`_ 3.6+
+ * `python`_ 3.9+
* `xapian (xapian-core and xapian-bindings)`_
.. _python: https://www.python.org/
@@ -49,20 +48,10 @@ You can start website with commands:
$ git clone https://gitlab.gnome.org/Infrastructure/extensions-web.git
$ cd extensions-web/openshift/docker
- $ MYSQL_USER=extensions-web \
- MYSQL_PASSWORD=SOME_PASSWORD \
- EGO_ALLOWED_HOST=* \
- EGO_DATABASE_URL=mysql://extensions-web:SOME_PASSWORD@db/extensions-web \
- EGO_NODE_ADDRESS=extensions-web \
- EGO_SECRET_KEY=SOME_SECRET_KEY \
- EGO_XAPIAN_DB=/extensions-web/data/xapian.db \
- EGO_NO_SECURE_SETTINGS=1 \
- docker-compose up --build
+ $ docker-compose up --build
That's all! Website will be available as http://localhost:8080.
-Don't forget to substitute "SOME_PASSWORD" and "SOME_SECRET_KEY" with proper values.
-
You also may want to create superuser account - look to virtualenv guide below for
apropriate command and `Docker`_ documentation for a way running command within running
`Docker`_ container.
diff --git a/openshift/docker/docker-compose.yml b/openshift/docker/docker-compose.yml
index 740956f..448785f 100644
--- a/openshift/docker/docker-compose.yml
+++ b/openshift/docker/docker-compose.yml
@@ -3,58 +3,94 @@ version: '3'
services:
db:
image: mariadb:10.3
+ command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment:
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
MYSQL_DATABASE: extensions-web
- MYSQL_USER:
- MYSQL_PASSWORD:
- ports:
- - "127.0.0.1:43306:3306"
+ MYSQL_USER: ${MYSQL_USER:-user}
+ MYSQL_PASSWORD: ${MYSQL_PASSWORD:-P@ssw0rd}
volumes:
- - "database:/var/lib/mysql"
- command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
+ - "ego-database:/var/lib/mysql"
+ networks:
+ - db
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 20s
retries: 10
+
+ phpmyadmin:
+ image: phpmyadmin/phpmyadmin
+ environment:
+ PMA_HOST: db
+ UPLOAD_LIMIT: 1G
+ MAX_EXECUTION_TIME: '0'
+ HIDE_PHP_VERSION: 'true'
+ networks:
+ - db
+ ports:
+ - '127.0.0.1:8088:80'
+
extensions-web:
build:
context: ../../
dockerfile: openshift/docker/Dockerfile
- command: bash -c "python manage.py migrate && rm -r /extensions-web/www/static-files; python manage.py
collectstatic --noinput && uwsgi --enable-threads --ini /extensions-web/wsgi.ini"
+ command:
+ - bash
+ - -c
+ - >-
+ python manage.py migrate &&
+ rm -rf /extensions-web/www/static-files &&
+ python manage.py collectstatic --noinput &&
+ uwsgi --enable-threads --ini /extensions-web/wsgi.ini
image: extensions-web
+ restart: unless-stopped
environment:
- EGO_ADMINISTRATOR_NAME: Yuri Konotopov
- EGO_ADMINISTRATOR_EMAIL: ykonotopov gnome org
- EGO_ALLOWED_HOST:
- EGO_DATABASE_URL:
- EGO_DEBUG:
- EGO_EMAIL_URL:
- EGO_NO_SECURE_SETTINGS:
- EGO_SECRET_KEY:
- EGO_XAPIAN_DB:
+ EGO_ADMINISTRATOR_NAME: ${EGO_ADMINISTRATOR_NAME:-Yuri Konotopov}
+ EGO_ADMINISTRATOR_EMAIL: ${EGO_ADMINISTRATOR_EMAIL:-ykonotopov gnome org}
+ EGO_ALLOWED_HOST: ${EGO_ALLOWED_HOST:-*}
+ EGO_DATABASE_URL: ${EGO_DATABASE_URL:-mysql://user:P%40ssw0rd@db/extensions-web}
+ EGO_DEBUG: ${EGO_DEBUG:-1}
+ EGO_EMAIL_URL: ${EGO_EMAIL_URL:-}
+ EGO_NO_SECURE_SETTINGS: ${EGO_NO_SECURE_SETTINGS:-1}
+ EGO_SECRET_KEY: ${EGO_SECRET_KEY:-DONOTUSEMEINPRODUCTION}
+ EGO_XAPIAN_DB: ${EGO_XAPIAN_DB:-/extensions-web/data/xapian.db}
EGO_MEDIA_ROOT: /extensions-web/www/uploaded-files
EGO_STATIC_ROOT: /extensions-web/www/static-files
depends_on:
- db
- links:
- - db
volumes:
- - "static:/extensions-web/www"
+ - "ego-data:/extensions-web/data"
+ - "ego-static:/extensions-web/www"
+ networks:
+ - frontend
+ - db
+
frontend:
build:
context: nginx
dockerfile: Dockerfile
- command: bash -c "envsubst '$$EGO_NODE_ADDRESS' < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf
&& nginx -g 'daemon off;'"
+ command:
+ - bash
+ - -c
+ - >-
+ envsubst '$$EGO_NODE_ADDRESS' < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf &&
+ /docker-entrypoint.sh nginx -g "daemon off;"
environment:
EGO_NODE_ADDRESS: extensions-web
links:
- extensions-web
ports:
- - "8080:8080"
+ - "127.0.0.1:8080:8080"
volumes:
- - "static:/extensions-web/www"
+ - "ego-static:/extensions-web/www"
+ networks:
+ - frontend
volumes:
- database:
- static:
+ ego-database:
+ ego-data:
+ ego-static:
+
+networks:
+ frontend:
+ db:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]