This commit is contained in:
xiabin 2025-02-11 10:58:56 +08:00
parent b9de9dbb71
commit d33b313325

View File

@ -20,36 +20,6 @@ jobs:
uses: actions/checkout@v5 uses: actions/checkout@v5
- name: Build Auth Service - name: Build Auth Service
working-directory: ./app/auth_service/auth_service
env:
CGO_ENABLED: 0
run: | run: |
go build -v -o auth_service . ls -la
mv auth_service ../../../../ tree
- name: Build User Management
working-directory: ./app/user_management/user_management
env:
CGO_ENABLED: 0
run: |
go build -v -o user_management .
mv user_management ../../../../
- name: Prepare Docker Environment
run: |
cat <<EOF > Dockerfile
FROM alpine
WORKDIR /app
COPY auth_service user_management ./
EXPOSE 8888 8889
CMD ["./auth_service & ./user_management"]
EOF
- name: Build and Run Container
run: |
docker build -t combined-services .
docker run -d \
-p 8888:8888 \
-p 8889:8889 \
--name services-container \
combined-services