0
votes

How can I set a variable in the docker container within the Github workflow?

  scp  -o StrictHostKeyChecking=no -r ./.env ./docker-compose.prod.yml root@${{ secrets.DIGITAL_OCEAN_IP_ADDRESS_2 }}:/app
  ssh -o StrictHostKeyChecking=no root@${{ secrets.DIGITAL_OCEAN_IP_ADDRESS_2 }} << 'ENDSSH'
    echo "REACT_APP_AXIOS_URL=164.90.144.184" >> .env1 #This line works fine
    docker exec -it frontend sh
    echo "REACT_APP_AXIOS_URL=164.90.144.184" >> .env1 #This line does not
  ENDSSH

I want to set the REACT_APP_AXIOS_URL within the docker exec -it frontend sh. In the command line, I am able to execute docker exec -it frontend sh.