fucking arround with docker compose ...

This commit is contained in:
zwnk 2025-01-16 20:29:43 -03:00
parent b4cb57fee1
commit 93c881c1fb
2 changed files with 8 additions and 9 deletions

View file

@ -1,6 +1,6 @@
# backend/Dockerfile # backend/Dockerfile
FROM python:3.9-slim FROM python:3.9-slim
RUN mkdir -p -m 0600 ~/.ssh && ssh-keyscan -p 222 git.impstyle.com >> ~/.ssh/known_hosts
# Set environment variables # Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1 ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1 ENV PYTHONUNBUFFERED 1
@ -16,15 +16,14 @@ RUN apt-get update && apt-get install -y \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# Install Python dependencies # Install Python dependencies
COPY requirements.txt . #COPY requirements.txt .
COPY . .
RUN pip install --no-cache-dir -r requirements.txt RUN pip install --no-cache-dir -r requirements.txt
# Copy project
COPY . .
# Copy entrypoint script and set permissions # Copy entrypoint script and set permissions
COPY entrypoint.sh /entrypoint.sh #COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh \ #RUN chmod +x /entrypoint.sh \
&& sed -i 's/\r$//g' /entrypoint.sh # && sed -i 's/\r$//g' /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"] #ENTRYPOINT ["/entrypoint.sh"]

View file

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/bash
# Wait for postgres to be ready # Wait for postgres to be ready
while ! nc -z db 5432; do while ! nc -z db 5432; do