From 83b737c3bb105f4dc93786b0069cdacefe1726a0 Mon Sep 17 00:00:00 2001 From: Daniel Grams Date: Wed, 22 Mar 2023 20:45:33 +0100 Subject: [PATCH] Rename .de to .com #386 --- README.md | 2 +- .../docker-compose/nginx.config.example | 14 +++---- doc/development.md | 40 +++++++++---------- docker-compose.yml | 2 +- project/__init__.py | 2 +- tests/api/test_organization.py | 4 +- tests/seeder.py | 2 +- 7 files changed, 33 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 7f2241e..e72a3b7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Open Event Database -![Tests](https://github.com/eventcally/eventcally/workflows/Tests/badge.svg) [![codecov](https://codecov.io/gh/eventcally/eventcally/branch/main/graph/badge.svg?token=66CLLWWV7Y)](https://codecov.io/gh/eventcally/eventcally) [![Cypress](https://img.shields.io/endpoint?url=https://dashboard.cypress.io/badge/simple/32g194/main&style=flat&logo=cypress)](https://dashboard.cypress.io/projects/32g194/runs) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) ![Docker Pulls](https://img.shields.io/docker/pulls/eventcally/eventcally) +![Tests](https://github.com/eventcally/eventcally/workflows/Tests/badge.svg) [![codecov](https://codecov.io/gh/eventcally/eventcally/branch/main/graph/badge.svg?token=66CLLWWV7Y)](https://codecov.io/gh/eventcally/eventcally) [![Cypress](https://img.shields.io/endpoint?url=https://dashboard.cypress.io/badge/simple/32g194/main&style=flat&logo=cypress)](https://dashboard.cypress.io/projects/32g194/runs) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Docker Pulls](https://img.shields.io/docker/pulls/eventcally/eventcally)](https://hub.docker.com/r/eventcally/eventcally) Event website using Python, Flask and Postgres. diff --git a/deployment/docker-compose/nginx.config.example b/deployment/docker-compose/nginx.config.example index e56183b..7560078 100644 --- a/deployment/docker-compose/nginx.config.example +++ b/deployment/docker-compose/nginx.config.example @@ -3,11 +3,11 @@ http { server { listen 80 default_server; listen [::]:80 default_server; - root /var/www/vhosts/eventcally.de; + root /var/www/vhosts/eventcally.com; server_name _; location ^~ /image/ { - root "/var/www/vhosts/eventcally.de/cache/img"; + root "/var/www/vhosts/eventcally.com/cache/img"; expires 1h; location ~ ^/image/(?[0-9]+)/(?[0-9]+) { @@ -25,23 +25,23 @@ http { } } location ^~ /static/ { - root "/var/www/vhosts/eventcally.de/"; + root "/var/www/vhosts/eventcally.com/"; location ~ ^/static/(.*)$ { try_files /static-custom/$1 /static/$1 @docker; } } location ^~ /dump/ { - alias "/var/www/vhosts/eventcally.de/cache/dump/"; + alias "/var/www/vhosts/eventcally.com/cache/dump/"; } location ^~ /sitemap.xml { - alias "/var/www/vhosts/eventcally.de/cache/sitemap.xml"; + alias "/var/www/vhosts/eventcally.com/cache/sitemap.xml"; } location ^~ /robots.txt { - alias "/var/www/vhosts/eventcally.de/cache/robots.txt"; + alias "/var/www/vhosts/eventcally.com/cache/robots.txt"; } location ^~ /favicon.ico { - alias "/var/www/vhosts/eventcally.de/static/favicon.ico"; + alias "/var/www/vhosts/eventcally.com/static/favicon.ico"; expires 12h; } location @docker { diff --git a/doc/development.md b/doc/development.md index 15c1ceb..d22af74 100644 --- a/doc/development.md +++ b/doc/development.md @@ -1,5 +1,25 @@ # Development +## Docker + +### Compose (including dependencies) + +```sh +docker-compose up --build +``` + +### Build image + +```sh +docker build -t eventcally/eventcally:latest . +``` + +### Run container with existing postgres server + +```sh +docker run -p 5000:5000 -e "DATABASE_URL=postgresql://postgres@host.docker.internal/eventcally" eventcally/eventcally:latest +``` + ## Tests ### Create test database @@ -63,26 +83,6 @@ pybabel extract -F babel.cfg -o messages.pot . && pybabel extract -F babel.cfg - pybabel compile -d project/translations ``` -## Docker - -### Build image - -```sh -docker build -t eventcally/eventcally:latest . -``` - -### Run container with existing postgres server - -```sh -docker run -p 5000:5000 -e "DATABASE_URL=postgresql://postgres@host.docker.internal/eventcally" eventcally/eventcally:latest -``` - -### Compose (including dependencies) - -```sh -docker-compose up --build -``` - ## Celery ```sh diff --git a/docker-compose.yml b/docker-compose.yml index f077b50..7fee668 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ x-web-env: FLASK_APP: main.py DATABASE_URL: postgresql://eventcally:pass@db/eventcally REDIS_URL: redis://default:pass@redis - MAIL_DEFAULT_SENDER: noresponse@eventcally.de + MAIL_DEFAULT_SENDER: noresponse@eventcally.com MAIL_SERVER: mailhog MAIL_PORT: 1025 MAIL_USE_TLS: False diff --git a/project/__init__.py b/project/__init__.py index 8d329a4..503c8d4 100644 --- a/project/__init__.py +++ b/project/__init__.py @@ -141,7 +141,7 @@ mail_server = os.getenv("MAIL_SERVER") if not mail_server: app.config["MAIL_SUPPRESS_SEND"] = True - app.config["MAIL_DEFAULT_SENDER"] = "test@eventcally.de" + app.config["MAIL_DEFAULT_SENDER"] = "test@eventcally.com" else: # pragma: no cover app.config["MAIL_SUPPRESS_SEND"] = False app.config["MAIL_SERVER"] = mail_server diff --git a/tests/api/test_organization.py b/tests/api/test_organization.py index 2a92b7b..a5229d1 100644 --- a/tests/api/test_organization.py +++ b/tests/api/test_organization.py @@ -48,14 +48,14 @@ def test_list_unverified(client, app, seeder, utils): assert response.json["items"][0]["id"] == verified_admin_unit_id # Authorisierte Nutzer, die Organisationen verifizieren dürfen, sehen alle Organisationen. - # "admin@eventcally.de" ist Mitglied der Organisation "eventcally", die andere Organisationen verifizieren darf. + # "admin@eventcally.com" ist Mitglied der Organisation "eventcally", die andere Organisationen verifizieren darf. with app.app_context(): from project.services.admin_unit import get_admin_unit_by_name eventcally_id = get_admin_unit_by_name("eventcally").id utils.logout() - utils.login("admin@eventcally.de") + utils.login("admin@eventcally.com") response = utils.get_ok(url) assert len(response.json["items"]) == 3 assert response.json["items"][0]["id"] == eventcally_id diff --git a/tests/seeder.py b/tests/seeder.py index 7c420a3..0283d95 100644 --- a/tests/seeder.py +++ b/tests/seeder.py @@ -104,7 +104,7 @@ class Seeder(object): if other_admin_unit: other_admin_unit_id = other_admin_unit.id else: - other_user_id = self.create_user("admin@eventcally.de") + other_user_id = self.create_user("admin@eventcally.com") other_admin_unit_id = self.create_admin_unit( other_user_id, "eventcally", can_verify_other=True )