github.com/filecoin-project/bacalhau@v0.3.23-0.20230228154132-45c989550ace/dashboard/README.md (about)

     1  ## dev
     2  
     3  Deploy VM:
     4  
     5  ```bash
     6  cd bacalhau/dashboard/terraform
     7  terraform init
     8  terraform apply -var-file prod.tfvars
     9  ```
    10  
    11  Build images:
    12  
    13  ```bash
    14  cd bacalhau
    15  bash dashboard/scripts/deploy.sh build:api
    16  bash dashboard/scripts/deploy.sh build:frontend
    17  # copy the images
    18  gcloud compute ssh dashboard-vm-default-0
    19  cd /data/dashboard
    20  vi .env
    21  # paste the images and save
    22  ```
    23  
    24  Start and stop stack:
    25  
    26  ```bash
    27  gcloud compute ssh dashboard-vm-default-0
    28  cd /data/dashboard
    29  sudo docker-compose stop
    30  sudo docker-compose up -d
    31  ```
    32  
    33  Production postgres:
    34  
    35  ```bash
    36  gcloud compute ssh dashboard-vm-default-0
    37  docker ps -a
    38  # copy the id of the postgres container
    39  docker exec -ti <id> psql --user postgres
    40  ```
    41  
    42  Get TLS cert:
    43  
    44  ```bash
    45  sudo apt install certbot python3-certbot-nginx
    46  ```
    47  
    48  copy the `certbot/nginx.conf` file to the vm `/etc/nginx/sites-available/dashboard.bacalhau.org` and delete the default file
    49  
    50  ```bash
    51  sudo systemctl stop nginx
    52  sudo systemctl start nginx
    53  sudo certbot --nginx -d dashboard.bacalhau.org
    54  ```