Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -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"
42 changes: 42 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -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 }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
*.pem

#Environment
#.env
.env
.venv
env/
venv/
*.ini

#Docker
#*Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name=development

[log]
db_url=
db_database=logs
db_database=auth-logs
db_collection=
level=DEBUG

Expand Down