✒️
poocho • documentation
  • Introduction
  • Basics
    • To Do
    • Logins
    • Table of Contents
  • Useful Commands
  • Environments
    • Local Environment Setup
      • macOS setup
      • Routes
    • Remote Server Setup
      • Server Setup
      • Client Environment
    • AWS Cognito Setup
    • Dockerhub
  • Server Info
    • Application
      • ** NATS
      • Dependencies
      • Main Stack
    • Server Information
      • Continuous Integration
      • Servers
        • Amazon Web Services
        • Digital Ocean
      • Code Repositories
      • Domains In Use
      • Email Settings
      • Domain Hosts & Registration
        • Domain Registrar (NameCheap)
        • DNS Host (Cloudflare)
        • Email (Gsuite)
    • External Services
      • Landbot.io
      • Flow.ai
    • Amazon Web Services (AWS)
      • AWS EC2/EBS
      • AWS Simple Email Service
      • AWS Cognito (v2)
      • AWS Cognito
      • AWS Lightsail
      • AWS Route 53
  • Code & Documentation
    • Client
    • Functions
    • Server
Powered by GitBook
On this page
  • Create Server
  • Setup Dev/Production Server Environment

Was this helpful?

  1. Environments
  2. Remote Server Setup

Server Setup

We're using AWS Lightsail ➜ $5 ➜ 1 GB Memory, 1 Core Processor, 40 GB SSD Disk, 2 TB Transfer

Create Server

  • Create a new VM that's at least 1GB RAM & 1vPU

  • Assign a static IP

  • Get updates with sudo apt update && sudo apt dist-upgrade -y && sudo apt autoremove -y

  • Enable Digital Ocean metrics with curl -sSL https://repos.insights.digitalocean.com/install.sh | sudo bash

  • Install Docker with sudo apt install docker.io docker-compose -y

  • Enable Autostart for Docker with sudo systemctl start docker && sudo systemctl enable docker

  • Create a new directory with mkdir home at the root.

  • Enter cd home

  • Clone git repo git clone https://github.com/yalefox/messenger-nats-yalewtf.git

Setup Dev/Production Server Environment

  • Navigate to the root directory.

  • Run sudo nano .env this is for the server.

POSTGRES_HOST=messages-db
POSTGRES_USER=postgres
POSTGRES_PASS=postgres
POSTGRES_DB=underdog
AWS_REGION=us-east-1							
AWS_POOL_ID=us-east-1_Vv8eSQPw9
AWS_CLIENT_ID=34utdbhl5alaftk8bq9t9qvk9s
NATS_URL=nats://nats:4222
API_PORT=5050
  • POSTGRES_PASS: Make sure to set a strong password

  • AWS_REGION: Make sure the correct region is specified

  • AWS_POOL_ID: This needs to be specified

  • AWS_CLIENT_ID: AWS Cognito App Client ID in User Pool needs to be specified

PreviousRemote Server SetupNextClient Environment

Last updated 5 years ago

Was this helpful?