Giter Club home page Giter Club logo

simple_server_express's Introduction

simple_server_express

This project requires the following Repository Secrets to be updated(Github Secrets > Actions > Repository Secrets).

  • DEV_GITHUB_USER
    • Set to pmeaney
    • Doesn't need update
  • DEV_KEY_PRIVKEY_NOPASS_3_26_23
    • When we generated the Server with terraform, we provide in the terraform file a public key we use to boot the server (and then log into it-- via our laptop). This is the ssh private key associated with that public key.
    • Needs update (If we intend to pull this onto a new server and is not the same as key pair where public key used in terraform script)
    • Note: I need to go back and check if it will work with a key pair which has a pw
  • DEV_SERVER_IP
    • Needs update (If we intend to pull this onto a new server)
  • DEV_SSH_USER
    • Doesn't need update (as long as its the same one as terraform script)
  • GH_PAT_3_26_23
    • Doesn't need update

Several of the above items are used for the following:

  • In a Github Action, github spins up a tempoary CICD Server to do some work for us: Package up our app into a Container, and Deploy our app to our server.
  • So, we need that temporary Github Ubuntu Server to first be able to access our Hosting Server (e.g. Digital Ocean server).
  • What we have to do first though, before we can access Hosting Server, is provide the necessary secrets & keys to the temporary Github CICD server.
- name: Take ssh key from github repo, copy it into the ubuntu VM, so we can access the server & download the docker image
  run: |
    mkdir -p ~/.ssh/
    echo "$SSH_PRIV_KEY" > ~/.ssh/id_ed25519
    chmod 600 ~/.ssh/id_ed25519
    cat >>~/.ssh/config <<END
    Host dev
      HostName $DEV_SERVER_IP
      User $SSH_USER
      IdentityFile ~/.ssh/id_ed25519
      StrictHostKeyChecking no
    END
  env:
    SSH_USER: ${{ secrets.DEV_SSH_USER }}
    SSH_PRIV_KEY: ${{ secrets.DEV_KEY_PRIVKEY_NOPASS_3_26_23 }}
    DEV_SERVER_IP: ${{ secrets.DEV_SERVER_IP }}

simple_server_express's People

Contributors

pmeaney avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.