Compare commits

6 Commits

4 changed files with 7 additions and 5 deletions

View File

@@ -16,13 +16,13 @@ deploy:
stage: deploy stage: deploy
tags: tags:
- docker - docker
image: docker:20.10.16 image: docker:latest
services: services:
- name: docker:20.10.16-dind - name: docker:dind
alias: docker alias: docker
script: script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA . - docker buildx build --platform linux/amd64 -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA $CI_REGISTRY_IMAGE:latest - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA $CI_REGISTRY_IMAGE:latest
- docker push $CI_REGISTRY_IMAGE:latest - docker push $CI_REGISTRY_IMAGE:latest

View File

@@ -9,4 +9,5 @@ services:
- "8080:8080" - "8080:8080"
volumes: volumes:
- ./files:/app/static/assets/img/products/ - ./files:/app/static/assets/img/products/
- ./data:/app/data/
restart: unless-stopped restart: unless-stopped

View File

@@ -4,4 +4,5 @@ WORKDIR /app
RUN pip install -r requirements.txt RUN pip install -r requirements.txt
COPY . /app COPY . /app
RUN chmod +x scripts/run.bash RUN chmod +x scripts/run.bash
CMD ["bash", "scripts/run.bash"] EXPOSE 8080
ENTRYPOINT ["scripts/run.bash"]