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

Sponsorship Page #120

Merged
merged 5 commits into from
Oct 25, 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
34 changes: 34 additions & 0 deletions DEVNOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Developing

For development, you can deploy through Docker. This will install everything you need to get started.

### For Windows:
- [Docker Desktop](https://www.docker.com/products/docker-desktop/)
- You will also need to install a WSL that Docker can use

### For Linux and Mac:
- [Installing Docker](https://docs.docker.com/engine/install/ubuntu/)

Once that's done, you can just run the following in the root of this directory:

```
docker-compose up
```

Note: This command will reference the `docker-compose.yml` and start up a virtual environment. That will then host the site on a local server

Now your dev environment is ready! The local dev site will be available here:

```
http://localhost:3000
```

If you wish to docker exec into the container, run a command similar to the following:

```
docker exec -it ampwebv2_web_1 sh
```

# Deploying

The Amp Lab maintains a CI/CD pipeline. With every PR, you will see the website build on Github. As of October 2023, there are no formal tests in place to confirm code quality. However, the CI/CD pipeline will give you a decent look at whether or not the website builds. **Please** check the site before merging a pull request
8 changes: 2 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
FROM node:19-alpine
FROM node:18-alpine
WORKDIR /app

COPY package*.json pnpm-lock.yaml* ./
RUN npm install
COPY . .

RUN npm run build
ENV NODE_ENV production

EXPOSE 3000
ENV PORT 3000

CMD ["npm", "start"]
CMD ["npm", "run", "dev"]
7 changes: 6 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@ services:
web:
build: .
ports:
- "3000:3000"
- "3000:3000"
volumes:
- ./src:/app/src
- ./package.json:/app/package.json
- ./package-lock.json:/app/package-lock.json
- ./public:/app/public
Loading