mirror of
				https://gitea.publichub.eu/oscar.krause/fastapi-dls.git
				synced 2025-11-04 00:26:07 +00:00 
			
		
		
		
	Dockerfile - include version.env to image
This commit is contained in:
		@@ -24,9 +24,12 @@ deploy:
 | 
				
			|||||||
  stage: deploy
 | 
					  stage: deploy
 | 
				
			||||||
  rules:
 | 
					  rules:
 | 
				
			||||||
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
 | 
					    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
 | 
				
			||||||
 | 
					  before_script:
 | 
				
			||||||
 | 
					    - source version.env
 | 
				
			||||||
 | 
					    - Building docker image for commit "${COMMIT}" with version "${VERSION}"
 | 
				
			||||||
  script:
 | 
					  script:
 | 
				
			||||||
    - docker login -u $PUBLIC_REGISTRY_USER -p $PUBLIC_REGISTRY_TOKEN
 | 
					    - docker login -u $PUBLIC_REGISTRY_USER -p $PUBLIC_REGISTRY_TOKEN
 | 
				
			||||||
    - docker build . --tag $PUBLIC_REGISTRY_USER/${CI_PROJECT_NAME}:${CI_BUILD_REF}
 | 
					    - docker build . --tag $PUBLIC_REGISTRY_USER/${CI_PROJECT_NAME}:${VERSION}
 | 
				
			||||||
    - docker build . --tag $PUBLIC_REGISTRY_USER/${CI_PROJECT_NAME}:latest
 | 
					    - docker build . --tag $PUBLIC_REGISTRY_USER/${CI_PROJECT_NAME}:latest
 | 
				
			||||||
    - docker push $PUBLIC_REGISTRY_USER/${CI_PROJECT_NAME}:${CI_BUILD_REF}
 | 
					    - docker push $PUBLIC_REGISTRY_USER/${CI_PROJECT_NAME}:${VERSION}
 | 
				
			||||||
    - docker push $PUBLIC_REGISTRY_USER/${CI_PROJECT_NAME}:latest
 | 
					    - docker push $PUBLIC_REGISTRY_USER/${CI_PROJECT_NAME}:latest
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -11,6 +11,7 @@ RUN apk update \
 | 
				
			|||||||
 && apk del build-deps
 | 
					 && apk del build-deps
 | 
				
			||||||
 | 
					
 | 
				
			||||||
COPY app /app
 | 
					COPY app /app
 | 
				
			||||||
 | 
					COPY version.env /app/version.env
 | 
				
			||||||
COPY README.md /README.md
 | 
					COPY README.md /README.md
 | 
				
			||||||
 | 
					
 | 
				
			||||||
HEALTHCHECK --start-period=30s --interval=10s --timeout=5s --retries=3 CMD curl --insecure --fail https://localhost/status || exit 1
 | 
					HEALTHCHECK --start-period=30s --interval=10s --timeout=5s --retries=3 CMD curl --insecure --fail https://localhost/status || exit 1
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user