fix deployment staging compose
All checks were successful
Deploy / CreateImage (push) Successful in 2m20s
Deploy / DeployService (push) Successful in 1m11s

This commit is contained in:
skeris 2024-12-11 15:37:30 +03:00
parent d0b728140b
commit 7a16318de2
2 changed files with 11 additions and 13 deletions

@ -1,11 +1,9 @@
# BUILD
FROM penahub.gitlab.yandexcloud.net:5050/devops/dockerhub-backup/golang AS build
FROM gitea.pena/penadevops/container-images/golang:main AS build
# Update packages and clear cache
RUN apk update && apk add --no-cache curl && rm -rf /var/cache/apk/*
RUN apk add git
ENV GOPRIVATE=penahub.gitlab.yandexcloud.net/backend/penahub_common
RUN git config --global url."https://buildToken:glpat-axA8ttckx3aPf_xd2Dym@penahub.gitlab.yandexcloud.net/".insteadOf "https://penahub.gitlab.yandexcloud.net/"
# Set work directory
WORKDIR /app
# Create binary directory
@ -24,7 +22,7 @@ RUN GOOS=linux go build -o bin ./...
# TEST
FROM penahub.gitlab.yandexcloud.net:5050/devops/dockerhub-backup/alpine AS test
FROM gitea.pena/penadevops/container-images/alpine:main AS test
# Install packages
RUN apk --no-cache add ca-certificates && rm -rf /var/cache/apk/*
@ -44,7 +42,7 @@ CMD [ "./app" ]
# PRODUCTION
FROM penahub.gitlab.yandexcloud.net:5050/devops/dockerhub-backup/alpine AS production
FROM gitea.pena/penadevops/container-images/alpine:main AS production
# Install packages
RUN apk --no-cache add ca-certificates && rm -rf /var/cache/apk/*

@ -1,23 +1,23 @@
version: "3"
services:
discount-service-staging:
hostname: price
container_name: price
tty: true
image: $CI_REGISTRY_IMAGE/staging:$CI_COMMIT_REF_SLUG.$CI_PIPELINE_ID
image: gitea.pena:3000/penaside/discount/staging:$GITHUB_RUN_NUMBER
#command: dlv --listen=:2345 --headless=true --log=true --log-output=debugger,debuglineerr,gdbwire,lldbout,rpc --accept-multiclient --api-version=2 exec ./heruvym
labels:
com.pena.allowed_headers: content-type,authorization,response-type
environment:
- GRPC_HOST=0.0.0.0
- GPRC_PORT=9001
- HTTP_PORT=8001
- MONGO_HOST=10.8.0.6
- MONGO_HOST=10.7.0.6
- MONGO_PORT=27017
- MONGO_AUTH=discount
- MONGO_DB_NAME=discount
- MONGO_USER=$MONGO_USER
- MONGO_PASSWORD=$MONGO_PASSWORD
- MONGO_USER=discount-user
- MONGO_PASSWORD=uahgeJEGBjgtestdiscountuser
ports:
- 10.8.0.6:8001:8001
- 10.8.0.6:9001:9001
- 10.7.0.6:8001:8001
- 10.7.0.6:9001:9001
- 10.7.0.6:9101:9001