Skip to content
Snippets Groups Projects
Verified Commit 7aee9356 authored by Eunhak Lee's avatar Eunhak Lee
Browse files

feat: Gitlab CI 를 통한 Docker image 배포

parent e2b52acc
No related branches found
No related tags found
No related merge requests found
Pipeline #10590 passed
.DS_Store
/venv/
__pycache__
*.pyc
*.html
*.json
*.xml
*.zip
*.txt
!/requirements.txt
.env*
!/.env.example
stages:
- deploy
deploy:
image: docker
services:
- "docker:dind"
tags:
- dind
stage: deploy
only:
- main
- master
before_script:
- echo "$CI_REGISTRY_PASSWORD" | docker login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin
script:
- docker build --cache-from $CI_REGISTRY_IMAGE:latest -t $CI_REGISTRY_IMAGE:latest -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
- docker push $CI_REGISTRY_IMAGE:latest
after_script:
- docker logout $CI_REGISTRY
FROM python:3.13-alpine
WORKDIR /app
COPY ./requirements.txt /app
RUN pip install -r requirements.txt
COPY . /app
ENTRYPOINT ["python"]
CMD ["push_to_db.py"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment