diff --git a/.env.template b/.env.template index d2f94fc..3c188b4 100644 --- a/.env.template +++ b/.env.template @@ -1,8 +1,11 @@ +#NGINX +NGINX_HOSTNAME=localhost + # Django DJANGO_SETTINGS_MODULE=website.settings DJANGO_SECRET_KEY=CWHZCAZBNV57tDkwGHJwTUu3PCSnGG45 DEBUG=TRUE -ALLOWED_HOSTS=localhost +#ALLOWED_HOSTS=localhost # Database (PostgreSQL) POSTGRES_USER=test_user @@ -14,4 +17,4 @@ POSTGRES_DB=test_db # Gunicorn GUNICORN_WORKERS=3 -GUNICORN_TIMEOUT=120 +GUNICORN_TIMEOUT=120 \ No newline at end of file diff --git a/.gitea/workflows/build_test.yaml b/.gitea/workflows/build_test.yaml index e576924..9434cd8 100644 --- a/.gitea/workflows/build_test.yaml +++ b/.gitea/workflows/build_test.yaml @@ -3,7 +3,6 @@ run-name: ${{ gitea.actor }} on: push: branches: - - pre-prod - main pull_request: diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml new file mode 100644 index 0000000..8e2eb60 --- /dev/null +++ b/.gitea/workflows/test.yaml @@ -0,0 +1,17 @@ +name: Gitea Test. +run-name: ${{ gitea.actor }} +on: + push: + branches: + - pre-prod + pull_request: + +jobs: + tests: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: test + run: make test \ No newline at end of file diff --git a/Makefile b/Makefile index 71226fa..cfeaf72 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ prod: docker compose down - docker compose -f ./compose.yaml -f ./.docker-compose-files/compose.prod.yaml up -d --build + docker compose --env-file .env -f ./compose.yaml -f ./.docker-compose-files/compose.prod.yaml up -d --build docker exec quatsh-website-web-1 python manage.py collectstatic --noinput docker exec quatsh-website-web-1 python manage.py check --deploy docker exec quatsh-website-web-1 python manage.py migrate