Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Authenticator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MECRED
Authenticator
Commits
78ada654
Commit
78ada654
authored
10 months ago
by
Richard Fernando Heise Ferreira
Browse files
Options
Downloads
Patches
Plain Diff
init repo
parent
3821ea57
Branches
main
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Dockerfile.prod
+24
-0
24 additions, 0 deletions
Dockerfile.prod
app/govbr_auth.py
+4
-0
4 additions, 0 deletions
app/govbr_auth.py
docker-compose.yml
+13
-0
13 additions, 0 deletions
docker-compose.yml
requirements.txt
+3
-0
3 additions, 0 deletions
requirements.txt
with
44 additions
and
0 deletions
Dockerfile.prod
0 → 100644
+
24
−
0
View file @
78ada654
# Usar a imagem oficial do Python como base
FROM python:3.9-slim
# Define a variável de ambiente para desabilitar a criação de arquivos .pyc
ENV PYTHONDONTWRITEBYTECODE 1
# Define a variável de ambiente para não armazenar em cache as instalações do Python
ENV PYTHONUNBUFFERED 1
# Define o diretório de trabalho no contêiner
WORKDIR /app
# Instala as dependências do sistema
RUN apt-get update \
&& apt-get install -y --no-install-recommends gcc \
&& rm -rf /var/lib/apt/lists/*
# Copia os arquivos de código para o contêiner
COPY . .
# Instala as dependências do Python
RUN pip install --no-cache-dir -r requirements.txt
# Comando para iniciar o servidor WSGI (substitua "app:app" pelo nome do módulo e da instância da aplicação Flask)
CMD ["gunicorn", "--bind", "0.0.0.0:3333", "proxy:app"]
This diff is collapsed.
Click to expand it.
app/govbr_auth.py
0 → 100644
+
4
−
0
View file @
78ada654
#!/bin/python3
from
flask
import
Flask
,
send_file
,
make_response
import
requests
This diff is collapsed.
Click to expand it.
docker-compose.yml
0 → 100644
+
13
−
0
View file @
78ada654
version
:
'
3'
services
:
flask_app
:
build
:
context
:
.
dockerfile
:
Dockerfile.prod
ports
:
-
"
3333:3333"
volumes
:
-
./app:/app
environment
:
-
FLASK_ENV=production
This diff is collapsed.
Click to expand it.
requirements.txt
0 → 100644
+
3
−
0
View file @
78ada654
flask
gunicorn
requests
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment