Refactor Docker entrypoints and remove unused scripts
- Removed custom entrypoint scripts for backend, frontend, and PostgreSQL services from docker-compose files. - Added a new entrypoint script in the backend and frontend Dockerfiles to handle initialization without relying on host-mounted scripts. - Updated Dockerfiles to ensure proper permissions for the new entrypoint scripts. - Enhanced database initialization logic by moving schema and extension creation to the Alembic migration script.
This commit is contained in:
@@ -42,6 +42,10 @@ COPY requirements.txt .
|
||||
# Instalar dependencias Python
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Entrypoint (espera Postgres/Keycloak; no montar desde el host)
|
||||
COPY docker-entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
# Copiar código
|
||||
COPY . .
|
||||
|
||||
@@ -52,5 +56,7 @@ ENV APP_VERSION=${APP_VERSION}
|
||||
# Exponer puerto
|
||||
EXPOSE 8000
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
# Comando por defecto
|
||||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
|
||||
|
||||
Reference in New Issue
Block a user