Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update prod files #341

Merged
merged 4 commits into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion src/build/production/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
# 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.
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)

## Useful Commands
All of these are running from the directory `/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 <service-name>
```
2 changes: 1 addition & 1 deletion src/build/production/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down