quiet-dentist-42775
11/23/2023, 1:56 PMpython_requirement(
name='auth_requirements',
requirements = [
'python-dotenv',
'fastapi',
'uvicorn',
'pydantic'
]
)
resource(name='env', source='//.env')
python_sources(
name='auth_app',
sources=[
'src/**'
],
dependencies=[
':auth_requirements',
':env',
'libs/util/db/mongoose:db_mongoose',
'libs/domains/users:domain_users'
],
)
pex_binary(
name='main',
entry_point='src/app.py',
dependencies=[
':auth_app',
],
output_path='auth/main.pex',
)
docker_image(
name='zillow-auth',
pull=True,
instructions=[
'FROM python:3.11',
'COPY auth/main.pex /home/zillow/auth/main.pex',
'CMD /home/zillow/auth/main.pex',
],
output_path='auth/zillow-auth.docker-info.json',
)curved-television-6568
11/23/2023, 2:41 PMfile(name='env', source='.env')
Then move the dependency on :env from your python_sources to the docker_image and add a COPY .env /home/zillow/.. or where ever you want to have it.quiet-dentist-42775
11/27/2023, 6:44 AM