Skip to content
Snippets Groups Projects
Commit 39644ef5 authored by Adrian Block's avatar Adrian Block
Browse files

💚 added CI

parent ed97e2fd
No related branches found
No related tags found
No related merge requests found
Pipeline #
SERVER_NAME=PAULO
SERVER_HOST=http://localhost
BACKEND_CORS_ORIGINS='["http://localhost"]'
BACKEND_CORS_ORIGINS=["http://localhost"]
PROJECT_NAME=PAULO
......
stages:
- build
build-backend:
image: docker:19.03.12
stage: build
tags:
- shared
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -t $CI_REGISTRY_IMAGE .
- docker push $CI_REGISTRY_IMAGE
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
build-backend-dev:
image: docker:19.03.12
stage: build
tags:
- shared
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -t $CI_REGISTRY_IMAGE:dev .
- docker push $CI_REGISTRY_IMAGE:dev
rules:
- if: '$CI_COMMIT_BRANCH == "dev"'
......@@ -2,7 +2,11 @@ FROM python:3.9
WORKDIR /backend
COPY . /backend
COPY poetry.lock /backend
COPY pyproject.toml /backend
COPY app /backend/app
COPY alembic /backend/alembic
COPY alembic.ini /backend
RUN pip3 install poetry
......@@ -12,4 +16,4 @@ RUN poetry install --no-dev
RUN pip install uvicorn
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0"]
CMD ["uvicorn", "app.api:app", "--host", "0.0.0.0"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment