diff --git a/.env b/.env index e2d56b7..19d794b 100644 --- a/.env +++ b/.env @@ -2,8 +2,9 @@ MONGO_URL = DB_NAME = development DB_USERS_COLLECTION = "users" DB_USERS_PICTURES_COLLECTION = "users.pictures" -DB_USERS_ADDRESS_COLLECTION = "users.addresses" -SECRET_KEY = +DB_USERS_CONTACTS_COLLECTION = "users.contacts" +DB_USERS_MESSAGES_COLLECTION = "users.messages" +SECRET_KEY = "" ALGORITHM = "HS256" EXPIRE_MINUTES = 15 CORS_ALLOWED_HOSTS = "http://localhost:8081" \ No newline at end of file diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..adb73aa --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,42 @@ +name: Create and publish Docker image CI + +on: + pull_request: + branches: [ "main" ] + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + push_to_register: + name: Push Docker image to github register + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + steps: + - name: Check out the repo + uses: actions/checkout@v5 + + - name: Log in to the container registry + uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GH_TOKEN }} + + - name: Extract metadata (tags, labels) + id: meta + uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Build and push Docker image + id: push + uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.gitignore b/.gitignore index 690f310..523b8d5 100755 --- a/.gitignore +++ b/.gitignore @@ -16,10 +16,11 @@ *.pem #Environment -#.env +.env .venv env/ venv/ +*.ini #Docker #*Dockerfile diff --git a/config.ini b/config.ini index 14494e4..bb9ac36 100644 --- a/config.ini +++ b/config.ini @@ -4,7 +4,7 @@ name=development [log] db_url= -db_database=logs +db_database=auth-logs db_collection= level=DEBUG