From fa11c2bb4c1629059b7d9b5e9b57e87bde5c4b57 Mon Sep 17 00:00:00 2001 From: Albert Liu Date: Wed, 23 Aug 2023 21:49:41 -0700 Subject: [PATCH 1/4] Update docker-compose.yml --- src/build/production/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/build/production/docker-compose.yml b/src/build/production/docker-compose.yml index 4cbb2210..8666d858 100644 --- a/src/build/production/docker-compose.yml +++ b/src/build/production/docker-compose.yml @@ -56,7 +56,7 @@ services: environment: - DB_USERNAME=postgres - DB_PASSWORD=postgres - - SCHEDGE_ADMIN_PASSWORD= + - SCHEDGE_ADMIN_PASSWORD=$SCHEDGE_ADMIN_PASSWORD - JDBC_URL=jdbc:postgresql://postgres/postgres expose: From c382b9e70c1330ceb31f57c3172974b523a485ee Mon Sep 17 00:00:00 2001 From: Albert Liu Date: Wed, 23 Aug 2023 21:57:34 -0700 Subject: [PATCH 2/4] Update README.md --- src/build/production/README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/build/production/README.md b/src/build/production/README.md index 9b1a0a43..42e999ce 100644 --- a/src/build/production/README.md +++ b/src/build/production/README.md @@ -1,4 +1,13 @@ # Production Files This folder is copied by `/.github/workflows/deploy.yml` and added to the branch `prod-config`, which can then be cloned by the production -server to deploy changes to the infrastructure of Schedge. \ No newline at end of file +server to deploy changes to the infrastructure of Schedge. + +### Production layout +- Runs on a AWS Lightsail instance w/ 1GB RAM and 1vCPU +- Project at `/home/ubuntu/schedge` +- Cloned using `git clone -b prod-config --single-branch https://github.com/A1Liu/schedge` +- Folders/files that the environment uses: + - `.env` file for environment variables + - `.letsencrypt` folder for ACME (this is created for you) + - `.build` folder for postgres DB (this is created for you) From b96e71701ed916c821e302feaf65e7c0d5443689 Mon Sep 17 00:00:00 2001 From: Albert Liu Date: Wed, 23 Aug 2023 22:04:27 -0700 Subject: [PATCH 3/4] Update README.md --- src/build/production/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/build/production/README.md b/src/build/production/README.md index 42e999ce..8262d17c 100644 --- a/src/build/production/README.md +++ b/src/build/production/README.md @@ -11,3 +11,15 @@ server to deploy changes to the infrastructure of Schedge. - `.env` file for environment variables - `.letsencrypt` folder for ACME (this is created for you) - `.build` folder for postgres DB (this is created for you) + +## Useful Commands +All of these are running from `/home/ubuntu/schedge` + +- Spin up the docker environment (also potentially update it if its already running) + ``` + docker-compose -f docker-compose.yml up -d + ``` +- Print logs for a service in the docker compose + ``` + docker-compose -f docker-compose.yml logs + ``` From 8b26b6af17b3148e7330e926f3d454b41c9e698b Mon Sep 17 00:00:00 2001 From: Albert Liu Date: Wed, 23 Aug 2023 22:12:57 -0700 Subject: [PATCH 4/4] Update README.md --- src/build/production/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/build/production/README.md b/src/build/production/README.md index 8262d17c..cd9e83da 100644 --- a/src/build/production/README.md +++ b/src/build/production/README.md @@ -13,7 +13,7 @@ server to deploy changes to the infrastructure of Schedge. - `.build` folder for postgres DB (this is created for you) ## Useful Commands -All of these are running from `/home/ubuntu/schedge` +All of these are running from the directory `/home/ubuntu/schedge` - Spin up the docker environment (also potentially update it if its already running) ```