mirror of
https://github.com/lucaspalomodevelop/eventcally.git
synced 2026-03-13 00:07:22 +00:00
Rename .de to .com #386
This commit is contained in:
parent
6c517f8324
commit
83b737c3bb
@ -1,6 +1,6 @@
|
||||
# Open Event Database
|
||||
|
||||
 [](https://codecov.io/gh/eventcally/eventcally) [](https://dashboard.cypress.io/projects/32g194/runs) [](https://github.com/psf/black) 
|
||||
 [](https://codecov.io/gh/eventcally/eventcally) [](https://dashboard.cypress.io/projects/32g194/runs) [](https://github.com/psf/black) [](https://hub.docker.com/r/eventcally/eventcally)
|
||||
|
||||
Event website using Python, Flask and Postgres.
|
||||
|
||||
|
||||
@ -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/(?<id>[0-9]+)/(?<hash>[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 {
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user