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

Suggest edits to setup docs PR #538

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
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,12 @@ Please ensure the following are installed on your system:

### Step-by-step guide

1. Clone the [project](https://github.com/COSC-499-W2023/year-long-project-team-3)
2. Follow the steps in: [AWS Authentication Credentials Setup](docs/guides/aws_authentication.md)
3. Project Setup
1. Either: Set up the project on your machine:
- Follow the steps in: [Poll Worker Setup](docs/guides/poll_worker_setup.md)
- and: [Local Development Setup](docs/guides/local_development_setup.md)
2. Or set it up using Docker:
- Follow the steps in: [Local Docker Development Setup](docs/guides/local_docker_development_setup.md)
1. Clone the [project](https://github.com/COSC-499-W2023/year-long-project-team-3) using Git
2. Obtain the two required environment files for local development by contacting one of the project devs: `./.env` and `./workers/poll-worker/.env`
3. Follow the steps in: [AWS Authentication Credentials Setup](docs/guides/aws_authentication.md)
4. Project Setup
- Follow the steps in: [Poll Worker Setup](docs/guides/poll_worker_setup.md)
- and: [Local Development Setup](docs/guides/local_development_setup.md)

### Tests

Expand Down
21 changes: 0 additions & 21 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,6 @@ services:
networks:
- internal-dev

nextjs-app:
depends_on:
- db
build:
context: .
dockerfile: Dockerfile.dev
args:
- ARG_DATABASE_URL=$DATABASE_URL
- ARG_NEXTAUTH_URL=$NEXTAUTH_URL
container_name: docker-next
env_file: .env.docker.local
volumes:
- .:/app
ports:
- '3000:3000'
networks:
- internal-dev
links:
- db
restart: always

poll-worker:
build:
context: .
Expand Down
3 changes: 1 addition & 2 deletions docs/guides/aws_authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

1. Go to the [AWS console](https://ubc-cicsso.awsapps.com/start#/)
2. Click on your AWS account, and choose: `Access Keys`
3. Ensure the correct OS tab is selected at the top: The default is macOS and Linux
4. After selecting your OS, follow the instructions under: Option 1: Set AWS environment variables
3. Select Mac/Linux as your OS, copy the text for _Option 1: Set AWS environment variables_. The three keys copied from here (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY,AWS_SESSION_TOKEN) need to be pasted into the two environment files without the "export".
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it always be Mac/Linux even if their computer is windows?


**Note**: This credential is temporary so there is a chance you have to repeat this while working.
12 changes: 5 additions & 7 deletions docs/guides/local_development_setup.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
# Local Development Setup

1. Contact one of our devs to receive a link to the environment file and add it to the root directory:
1. Make sure to replace the text highlighted in yellow inside this file with <u>your</u> AWS access key ID, AWS secret
access key, and AWS session token (from the [AWS console](https://ubc-cicsso.awsapps.com/start#/))
2. From the root directory, install dependencies using:
1. Ensure that all environment files have already been added to the project.
2. From the root directory, install dependencies using (Node.js must be installed before doing this):
```bash
npm install
```
3. Make sure Docker Desktop is still running
3. Make sure Docker Desktop is running
4. Spin up the database using:
```bash
docker-compose -f docker-compose.dev.yml up db -d
```
5. Verify that the container _year-long-project-team-3-db-1_ is running in Docker Desktop
5. Verify that the container is running in Docker Desktop. If it fails it may be due to improperly configured or missing `.env` files.
6. Migrate the database using:
```bash
npm run migrate
Expand All @@ -22,4 +20,4 @@
npm run dev
```

The project should now be fully set up and running on [port 3000](http://localhost:3000/).
The project should now be fully set up and running on [port 3000](http://localhost:3000/).
16 changes: 4 additions & 12 deletions docs/guides/poll_worker_setup.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
# Poll Worker Setup

1. Contact one of our devs to receive a link to the environment file and add it to the _workers/poll-worker_ directory:
1. Make sure to replace the text highlighted in yellow inside this file with <u>your</u> AWS access key ID, AWS secret
access key, and AWS session token (from the [AWS console](https://ubc-cicsso.awsapps.com/start#/))
2. Navigate to the poll worker directory and install the required dependencies using:
1. Ensure that all environment files have already been added to the project.
2. Make sure Docker Desktop is running
3. From the root directory, start the poll worker using:
```bash
cd workers/poll-worker
npm install
```
3. Make sure Docker Desktop is running
4. Navigate to the root directory and start the poll worker using:
```bash
cd ../..
docker-compose -f docker-compose.dev.yml up poll-worker -d
```
5. Verify that the container docker-poll-worker is running in Docker Desktop
4. Verify that the container _docker-poll-worker_ is running in Docker Desktop
Loading