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 1 commit
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
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@ 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)
2. Obtain the two required environment files 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
2 changes: 1 addition & 1 deletion docs/guides/aws_authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,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
4. After selecting your OS, follow the instructions under: Option 1: Set AWS environment variables. The keys copied from here needs to be pasted into the environment files without the "export".

**Note**: This credential is temporary so there is a chance you have to repeat this while working.
10 changes: 4 additions & 6 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#/))
1. Ensure that all environment files have already been added to the project.
2. From the root directory, install dependencies using:
```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
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/).
4 changes: 1 addition & 3 deletions docs/guides/poll_worker_setup.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# 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#/))
1. Ensure that all environment files have already been added to the project.
2. Navigate to the poll worker directory and install the required dependencies using:
```bash
cd workers/poll-worker
Expand Down
Loading