4
.github/workflows/docker-build.yaml
vendored
4
.github/workflows/docker-build.yaml
vendored
@@ -6,6 +6,10 @@ on:
|
|||||||
- main
|
- main
|
||||||
types:
|
types:
|
||||||
- closed
|
- closed
|
||||||
|
paths:
|
||||||
|
- Dockerfile
|
||||||
|
- requirements.txt
|
||||||
|
- manage.py
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
|
|||||||
@@ -3,8 +3,6 @@ WORKDIR /app
|
|||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
COPY ./mysite ./mysite
|
|
||||||
COPY ./polls ./polls
|
|
||||||
COPY ./manage.py .
|
COPY ./manage.py .
|
||||||
|
|
||||||
RUN ./manage.py makemigrations
|
RUN ./manage.py makemigrations
|
||||||
|
|||||||
@@ -6,6 +6,9 @@ services:
|
|||||||
- "8989:8000"
|
- "8989:8000"
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
|
volumes:
|
||||||
|
- ./mysite:/app/mysite
|
||||||
|
- ./polls:/app/polls
|
||||||
environment:
|
environment:
|
||||||
DATABASE_NAME: ${DATABASE_NAME}
|
DATABASE_NAME: ${DATABASE_NAME}
|
||||||
DATABASE_USERNAME: ${DATABASE_USERNAME}
|
DATABASE_USERNAME: ${DATABASE_USERNAME}
|
||||||
|
|||||||
Reference in New Issue
Block a user