Compare commits

6 Commits

4 changed files with 7 additions and 5 deletions

View File

@@ -16,13 +16,13 @@ deploy:
stage: deploy
tags:
- docker
image: docker:20.10.16
image: docker:latest
services:
- name: docker:20.10.16-dind
- name: docker:dind
alias: docker
script:
- 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 tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA $CI_REGISTRY_IMAGE:latest
- docker push $CI_REGISTRY_IMAGE:latest

View File

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

View File

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

View File

@@ -1,4 +1,4 @@
#! /bin/bash
#!/bin/bash
pytest --disable-warnings
python ./scripts/create_database.py