Skip to content

Commit 9904eef

Browse files
authored
Merge pull request #87 from github-samples/one-hour
Modernize workshop
2 parents 2f57217 + 86a98f8 commit 9904eef

File tree

150 files changed

+8557
-9003
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+8557
-9003
lines changed

.DS_Store

-2 KB
Binary file not shown.

.dockerignore

Lines changed: 0 additions & 7 deletions
This file was deleted.

.gitignore

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,40 @@
1-
node_modules
2-
.next
1+
.DS_Store
2+
3+
# build output
4+
dist/
5+
6+
# generated types
7+
.astro/
8+
9+
# dependencies
10+
node_modules/
11+
12+
# logs
13+
npm-debug.log*
14+
yarn-debug.log*
15+
yarn-error.log*
16+
pnpm-debug.log*
17+
18+
# environment variables
19+
.env
20+
.env.production
21+
22+
# macOS-specific files
23+
.DS_Store
24+
25+
# jetbrains setting folder
26+
.idea/
27+
28+
# python
29+
venv
30+
.venv
31+
__pycache__/
32+
*.py[cod]
33+
*$py.class
34+
35+
# flask
36+
instance/
37+
.webassets-cache
38+
flask_session/
39+
.coverage
40+
htmlcov/

Dockerfile

Lines changed: 0 additions & 59 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Pets workshop
22

3-
This repository contains the project for both a guided workshop and the Modern DevOps with GitHub What The Hack. The project is a Next.js app that uses MongoDB for the database. The design is to be used as a walk-through of GitHub features, including [Codespaces](https://docs.github.com/en/codespaces/overview), [Actions](https://docs.github.com/en/actions/learn-github-actions) and [GitHub Advanced Security (GHAS)](https://docs.github.com/en/github/getting-started-with-github/about-github-advanced-security). You'll explore how to use these features to implement and improve your organization's DevOps processes.
3+
This repository contains the project for two guided workshops to explore various GitHub features. The project is a website for a fictional dog shelter, with a [Flask](https://flask.palletsprojects.com/en/stable/) backend using [SQLAlchemy](https://www.sqlalchemy.org/) and [Astro](https://astro.build/) frontend using [Svelte](https://svelte.dev/) for dynamic pages.
44

55
## Getting started
66

7-
> **[Get started learning about development and DevOps with GitHub!](./content/README.md)**
7+
> **[Get started learning about development with GitHub!](./content/README.md)**
88
99
## License
1010

client/.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.DS_Store
2+
node_modules
3+
dist

client/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM node:lts AS runtime
2+
WORKDIR /app
3+
4+
COPY . .
5+
6+
RUN npm install
7+
RUN npm run build
8+
9+
ENV HOST=0.0.0.0
10+
ENV PORT=4321
11+
EXPOSE 4321
12+
CMD node ./dist/server/entry.mjs

client/README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Astro Starter Kit: Basics
2+
3+
```sh
4+
npm create astro@latest -- --template basics
5+
```
6+
7+
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/basics)
8+
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/basics)
9+
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/basics/devcontainer.json)
10+
11+
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
12+
13+
![just-the-basics](https://github.com/withastro/astro/assets/2244813/a0a5533c-a856-4198-8470-2d67b1d7c554)
14+
15+
## 🚀 Project Structure
16+
17+
Inside of your Astro project, you'll see the following folders and files:
18+
19+
```text
20+
/
21+
├── public/
22+
│ └── favicon.svg
23+
├── src/
24+
│ ├── layouts/
25+
│ │ └── Layout.astro
26+
│ └── pages/
27+
│ └── index.astro
28+
└── package.json
29+
```
30+
31+
To learn more about the folder structure of an Astro project, refer to [our guide on project structure](https://docs.astro.build/en/basics/project-structure/).
32+
33+
## 🧞 Commands
34+
35+
All commands are run from the root of the project, from a terminal:
36+
37+
| Command | Action |
38+
| :------------------------ | :----------------------------------------------- |
39+
| `npm install` | Installs dependencies |
40+
| `npm run dev` | Starts local dev server at `localhost:4321` |
41+
| `npm run build` | Build your production site to `./dist/` |
42+
| `npm run preview` | Preview your build locally, before deploying |
43+
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
44+
| `npm run astro -- --help` | Get help using the Astro CLI |
45+
46+
## 👀 Want to learn more?
47+
48+
Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).

client/astro.config.mjs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// @ts-check
2+
import { defineConfig } from 'astro/config';
3+
import tailwindcss from '@tailwindcss/vite';
4+
import svelte from '@astrojs/svelte';
5+
6+
import node from '@astrojs/node';
7+
8+
// https://astro.build/config
9+
export default defineConfig({
10+
output: 'server',
11+
integrations: [
12+
svelte(),
13+
],
14+
vite: {
15+
plugins: [tailwindcss(), svelte()]
16+
},
17+
18+
adapter: node({
19+
mode: 'standalone'
20+
}),
21+
});

0 commit comments

Comments
 (0)