2

我已经构建并运行了 docker-compose。它显示它在 GitHub 操作上的 localhost:4466 上运行。但问题是,当尝试部署它时,我收到以下错误:

Could not connect to the server at ***. Please check if your server is running.

我该如何解决这个问题?

这是我的action.yml文件

name: Github Actions Test
# TODO:
# 4. build for Prod (master)
on:
  push:
    branches:
      - nsourov-develop # TODO: change later to `develop`
# env: # workflow scoped
#   ## Secrets
#   # Environment
#   # The syntax `INPUT_ENVKEY_xxx` is needed for SpicyPizza/create-envfile@v1 action
#   INPUT_ENVKEY_NODE_ENV: ${{ secrets.NODE_ENV }}
#   # Admin
#   INPUT_ENVKEY_PRISMA_ENDPOINT: ${{ secrets.PRISMA_ENDPOINT }}
#   INPUT_ENVKEY_PRISMA_SECRET: ${{ secrets.PRISMA_SECRET }}
#   # Backend
#   INPUT_ENVKEY_PORT: ${{ secrets.PORT }}
#   INPUT_ENVKEY_DASHBOARD_PORT: ${{ secrets.DASHBOARD_PORT }}
#   INPUT_ENVKEY_FRONTEND_URL: ${{ secrets.FRONTEND_URL }}
#   INPUT_ENVKEY_REACT_APP_BACKEND_API: ${{ secrets.REACT_APP_BACKEND_API }}

jobs:
  test:
    runs-on: ubuntu-18.04 # Don't use "latest" version to avoid unexpected breaking changes

    env:
      PRISMA_ENDPOINT: ${{secrets.PRISMA_ENDPOINT}}
      PRISMA_SECRET: ${{secrets.PRISMA_SECRET}}
      REACT_APP_BACKEND_API: ${{secrets.REACT_APP_BACKEND_API}}
      FRONTEND_URL: ${{secrets.FRONTEND_URL}}
    steps:
      - uses: actions/checkout@v1 # TODO: lower priority - might upgrade to v2 (check changelog first)
      - name: Bootstrap app on Ubuntu
        uses: actions/setup-node@v1 # an action that checks out your repository to $GITHUB_WORKSPACE in the virtual environment.
        with:
          node-version: 12 # to avoid unexpected behavior with future latest node upgrades
      - name: Install global packages
        run: npm install -g dotenv-cli yarn lerna prisma-cli wait-port
      - name: Install project deps
        run: yarn
      # - name: Make envfile
      #   uses: SpicyPizza/create-envfile@v1
      #   with:
      #     file_name: .env
      #     envkey_ENV_FILE: ".env"
      - name: Run docker
        run: docker-compose -f docker-compose.yml up --build -d

      - name: Check docker-compose is running properly or not
        run: docker-compose logs

      - name: Deploy and seed backend
        run: yarn deploy:backend

我想知道 github 操作中是否允许 localhost ?如果不是如何处理?

4

0 回答 0