Skip to content

Commit 2232194

Browse files
authored
Merge pull request #111 from zero-one-group/chore/housekeeping
Housekeeping
2 parents dff40d6 + 2d1c5a1 commit 2232194

File tree

668 files changed

+8681
-8401
lines changed

Some content is hidden

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

668 files changed

+8681
-8401
lines changed

.moon/tasks.yml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,15 @@ tasks:
2020
outputStyle: stream
2121
envFile: '.env'
2222

23-
# docker-build:
24-
# command: >
25-
# docker build -f $projectRoot/Dockerfile . -t $IMAGE_NAME:$APP_VERSION
26-
# && docker image list --filter reference=$APP_PREFIX-\\*
27-
# options:
28-
# mergeEnv: replace
29-
# runFromWorkspaceRoot: true
30-
# interactive: false
31-
# outputStyle: buffer-only-failure
32-
# runInCI: false
33-
# cache: false
34-
# shell: true
35-
3623
docker-images:
37-
command: 'docker image list --filter reference=$APP_PREFIX-\\*'
24+
script: |
25+
IMAGE_PREFIX="$(jq -r .name <$workspaceRoot'/package.json')" \
26+
&& docker image list --filter reference=$IMAGE_PREFIX-$project\*
3827
options:
3928
mergeEnv: replace
4029
runFromWorkspaceRoot: true
4130
interactive: false
42-
outputStyle: none
31+
outputStyle: buffer-only-failure
4332
runInCI: false
4433
cache: false
4534
shell: true

.moon/toolchain.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ node:
2121
# dependencyVersionFormat: link # Uses link:../relative/path and symlinks package contents.
2222
dependencyVersionFormat: workspace # Uses workspace:*, which resolves to "1.2.3". Requires package workspaces.
2323
pnpm:
24-
version: '10.17.1' # The version of the package manager to use.
24+
version: '10.18.0' # The version of the package manager to use.
2525

2626
# Configures Go within the toolchain.
2727
# unstable_go:

.moon/workspace.yml

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ vcs:
1111
pre-commit:
1212
- 'moon run :format --affected --status=all'
1313
- 'moon run :lint --affected --status=staged'
14+
syncHooks: false
1415

1516
hasher:
1617
optimization: performance
@@ -28,7 +29,7 @@ docker:
2829
deleteVendorDirectories: false
2930

3031
# Require a specific version of moon while running commands, otherwise fail.
31-
# versionConstraint: '>=1.0.0'
32+
versionConstraint: '>=1.41.1'
3233

3334
# Extend and inherit an external configuration file. Must be a valid HTTPS URL or file system path.
3435
# extends: './shared/workspace.yml'
@@ -51,23 +52,23 @@ telemetry: false
5152
# @see: https://moonrepo.dev/docs/config/workspace#templates
5253
generator:
5354
templates:
54-
- 'https://oss.zero-one-group.com/monorepo/templates/ansible.zip'
55-
- 'https://oss.zero-one-group.com/monorepo/templates/astro.zip'
56-
- 'https://oss.zero-one-group.com/monorepo/templates/fastapi-ai.zip'
57-
- 'https://oss.zero-one-group.com/monorepo/templates/gitlab-cicd.zip'
58-
- 'https://oss.zero-one-group.com/monorepo/templates/go-modular.zip'
59-
- 'https://oss.zero-one-group.com/monorepo/templates/golang.zip'
60-
- 'https://oss.zero-one-group.com/monorepo/templates/load-balancer.zip'
61-
- 'https://oss.zero-one-group.com/monorepo/templates/monitoring.zip'
62-
- 'https://oss.zero-one-group.com/monorepo/templates/nextjs.zip'
63-
- 'https://oss.zero-one-group.com/monorepo/templates/phoenix.zip'
64-
- 'https://oss.zero-one-group.com/monorepo/templates/postgresql.zip'
65-
- 'https://oss.zero-one-group.com/monorepo/templates/react-app.zip'
66-
- 'https://oss.zero-one-group.com/monorepo/templates/react-ssr.zip'
67-
- 'https://oss.zero-one-group.com/monorepo/templates/shared-ui.zip'
68-
- 'https://oss.zero-one-group.com/monorepo/templates/squidproxy.zip'
69-
- 'https://oss.zero-one-group.com/monorepo/templates/strapi.zip'
70-
- 'https://oss.zero-one-group.com/monorepo/templates/swarm.zip'
71-
- 'https://oss.zero-one-group.com/monorepo/templates/terragrunt.zip'
55+
# - 'https://oss.zero-one-group.com/monorepo/templates/ansible.zip'
56+
# - 'https://oss.zero-one-group.com/monorepo/templates/astro.zip'
57+
# - 'https://oss.zero-one-group.com/monorepo/templates/fastapi-ai.zip'
58+
# - 'https://oss.zero-one-group.com/monorepo/templates/gitlab-cicd.zip'
59+
# - 'https://oss.zero-one-group.com/monorepo/templates/go-clean.zip'
60+
# - 'https://oss.zero-one-group.com/monorepo/templates/go-modular.zip'
61+
# - 'https://oss.zero-one-group.com/monorepo/templates/load-balancer.zip'
62+
# - 'https://oss.zero-one-group.com/monorepo/templates/monitoring.zip'
63+
# - 'https://oss.zero-one-group.com/monorepo/templates/nextjs.zip'
64+
# - 'https://oss.zero-one-group.com/monorepo/templates/phoenix.zip'
65+
# - 'https://oss.zero-one-group.com/monorepo/templates/postgresql.zip'
66+
# - 'https://oss.zero-one-group.com/monorepo/templates/react-app.zip'
67+
# - 'https://oss.zero-one-group.com/monorepo/templates/react-ssr.zip'
68+
# - 'https://oss.zero-one-group.com/monorepo/templates/shared-ui.zip'
69+
# - 'https://oss.zero-one-group.com/monorepo/templates/squidproxy.zip'
70+
# - 'https://oss.zero-one-group.com/monorepo/templates/strapi.zip'
71+
# - 'https://oss.zero-one-group.com/monorepo/templates/swarm.zip'
72+
# - 'https://oss.zero-one-group.com/monorepo/templates/terragrunt.zip'
7273
# Uncomment to enable local templates or debug custom templates.
73-
# - './templates'
74+
- './templates'

.vscode/settings.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@
2020
"**/.output": true,
2121
"**/.next": true,
2222
"**/build": true,
23-
"**/dist": true,
24-
"**/docs": true,
25-
"/templates/": true
23+
"**/dist": true
2624
},
2725
"tailwindCSS.experimental.classRegex": [
2826
// @ref: https://www.tailwind-variants.org/docs/getting-started
@@ -31,6 +29,9 @@
3129
["classList={{([^;]*)}}", "\\s*?[\"'`]([^\"'`]*).*?:"]
3230
],
3331
"tailwindCSS.files.exclude": ["**/.github/**", "**/*.{md,js,ts,json}"],
32+
"[astro]": {
33+
"editor.defaultFormatter": "biomejs.biome"
34+
},
3435
"[css]": {
3536
"editor.defaultFormatter": "biomejs.biome"
3637
},

apps/astro-web/.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
STRAPI_BASE_URL=http://localhost:1337
2+
STRAPI_API_TOKEN=your_api_token_here

apps/astro-web/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
ARG PLATFORM=linux/amd64
55
ARG NODE_VERSION=22
66

7-
FROM busybox:1.37-glibc as glibc
8-
FROM joseluisq/static-web-server:2 as httpd
7+
FROM busybox:1.37-glibc AS glibc
8+
FROM joseluisq/static-web-server:2 AS httpd
99

1010
# -----------------------------------------------------------------------------
1111
# Base image with pnpm package manager.
@@ -36,7 +36,7 @@ RUN moon docker scaffold astro-web
3636
FROM base AS builder
3737

3838
# Copy workspace skeleton
39-
COPY --from=skeleton /root/.proto /root/.proto
39+
# COPY --from=skeleton /root/.proto /root/.proto
4040
COPY --from=skeleton /srv/.moon/docker/workspace .
4141

4242
# Install toolchain and dependencies
@@ -51,7 +51,7 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store moon run astro-web:build
5151
# -----------------------------------------------------------------------------
5252
# Production image, copy build output files and run the application (runner).
5353
# -----------------------------------------------------------------------------
54-
FROM --platform=${PLATFORM} gcr.io/distroless/base-nossl-debian12 as runner
54+
FROM --platform=${PLATFORM} gcr.io/distroless/base-nossl-debian12 AS runner
5555

5656
# ----- Read application environment variables --------------------------------
5757

apps/astro-web/biome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.2.3/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.2.5/schema.json",
33
"extends": ["./biome.json"],
44
"root": false,
55
"overrides": [

apps/astro-web/moon.yml

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,7 @@ id: 'astro-web'
1212

1313
project:
1414
name: astro-web
15-
description: 'Frontend application'
16-
17-
env:
18-
APP_PREFIX: "$(jq -r .name <$workspaceRoot'/package.json')"
19-
APP_VERSION: '$(jq -r .version <$workspaceRoot''/package.json'')'
20-
IMAGE_NAME: '$APP_PREFIX-$project'
15+
description: '_CHANGE_ME_DESCRIPTION_'
2116

2217
# Uncomment to use shared UI library
2318
# dependsOn:
@@ -40,30 +35,47 @@ tasks:
4035
envFile: '.env'
4136
cache: true
4237

43-
update-deps:
44-
command: 'pnpm -s exec npm-check-updates --configFileName .ncurc.json'
38+
docker-build:
39+
script: |
40+
DOCKER_IMAGE="$(jq -r .name <$workspaceRoot'/package.json')-$project" \
41+
DOCKER_IMAGE_VERSION="$(jq -r .version <$workspaceRoot'/package.json')" \
42+
&& docker build -f $projectRoot/Dockerfile . -t $DOCKER_IMAGE:$DOCKER_IMAGE_VERSION \
43+
&& docker image list --filter reference=$DOCKER_IMAGE\*
4544
options:
46-
interactive: true
45+
mergeEnv: replace
46+
runFromWorkspaceRoot: true
47+
interactive: false
48+
outputStyle: buffer-only-failure
49+
runInCI: false
4750
cache: false
51+
shell: true
4852

4953
docker-run:
50-
command: 'docker run --network=host --rm -it --env-file .env --name $IMAGE_NAME $IMAGE_NAME:$APP_VERSION'
54+
script: |
55+
DOCKER_IMAGE="$(jq -r .name <$workspaceRoot'/package.json')-$project" \
56+
DOCKER_IMAGE_VERSION="$(jq -r .version <$workspaceRoot'/package.json')" \
57+
&& docker run --network=host --rm -it --env-file $projectRoot/.env \
58+
--name $DOCKER_IMAGE $DOCKER_IMAGE:$DOCKER_IMAGE_VERSION
5159
options:
5260
mergeEnv: replace
61+
outputStyle: buffer-only-failure
5362
runFromWorkspaceRoot: true
5463
interactive: false
55-
outputStyle: buffer-only-failure
5664
runInCI: false
5765
cache: false
5866
shell: true
5967

6068
docker-shell:
61-
command: 'docker run --network=host --rm -it --env-file .env --entrypoint /bin/sh $IMAGE_NAME:$APP_VERSION'
69+
script: |
70+
DOCKER_IMAGE="$(jq -r .name <$workspaceRoot'/package.json')-$project" \
71+
DOCKER_IMAGE_VERSION="$(jq -r .version <$workspaceRoot'/package.json')" \
72+
&& docker run --network=host --rm -it --env-file $projectRoot/.env \
73+
--entrypoint /bin/sh $DOCKER_IMAGE:$DOCKER_IMAGE_VERSION
6274
options:
6375
mergeEnv: replace
6476
runFromWorkspaceRoot: true
65-
interactive: false
6677
outputStyle: buffer-only-failure
78+
interactive: false
6779
runInCI: false
6880
cache: false
6981
shell: true

apps/astro-web/package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "astro-web",
3+
"description": "_CHANGE_ME_DESCRIPTION_",
34
"type": "module",
45
"private": true,
56
"scripts": {
@@ -8,19 +9,20 @@
89
"preview": "astro preview",
910
"start": "pnpm dlx serve dist -l 4321 -n -C",
1011
"cleanup": "pnpm dlx rimraf node_modules dist .astro",
12+
"update-deps": "npm-check-updates --configFileName .ncurc.json",
1113
"lint": "biome lint . --write",
1214
"check": "biome check . --write",
1315
"astro": "astro"
1416
},
1517
"dependencies": {
16-
"astro": "^5.14.0",
18+
"astro": "^5.14.1",
1719
"lucide-astro": "^0.544.0"
1820
},
1921
"devDependencies": {
2022
"@biomejs/biome": "catalog:",
21-
"@tailwindcss/vite": "^4.1.13",
23+
"@tailwindcss/vite": "^4.1.14",
2224
"npm-check-updates": "catalog:",
2325
"tailwindcss-motion": "^1.1.1",
24-
"tailwindcss": "^4.1.13"
26+
"tailwindcss": "^4.1.14"
2527
}
2628
}

apps/astro-web/template.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# https://moonrepo.dev/docs/config/template
2+
# yaml-language-server: $schema=https://moonrepo.dev/schemas/template.json
3+
$schema: 'https://moonrepo.dev/schemas/template.json'
4+
5+
# REQUIRED: Name of the template in a human readable format.
6+
title: 'Astro Website'
7+
8+
# REQUIRED: Description of what the template is for and other relevant information.
9+
description: 'Astro website with Tailwind CSS'
10+
11+
# Destination path for the package.
12+
destination: 'apps/[package_name]'
13+
14+
# Mapping of variables that will be interpolated and rendered within template files.
15+
# Users will be prompted to provide a value when running the generator.
16+
variables:
17+
package_name:
18+
type: 'string'
19+
default: 'website'
20+
prompt: 'Package name (identifier)?'
21+
required: true
22+
23+
package_description:
24+
type: 'string'
25+
default: 'My Astro website'
26+
prompt: 'Package description?'
27+
required: true
28+
29+
port_number:
30+
type: 'number'
31+
default: 4321
32+
prompt: 'Port number?'
33+
required: true

0 commit comments

Comments
 (0)