Skip to content

Commit f6b2c91

Browse files
authored
Merge branch 'main' into dev
2 parents 77af6d0 + abf29af commit f6b2c91

File tree

6 files changed

+50
-6
lines changed

6 files changed

+50
-6
lines changed

apps/api/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN corepack enable
99
RUN pnpm install -g turbo@latest
1010

1111
# PRUNE WORKSPACE
12-
# Note: Here we cannot use --docker, as is recomended, since the generated
12+
# Note: Here we cannot use --docker, as is recommended, since the generated
1313
# json directory does not allow linking package.json executable files
1414
FROM base AS pruner
1515
COPY . .

apps/gateway/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN corepack enable
99
RUN pnpm install -g turbo@latest
1010

1111
# PRUNE WORKSPACE
12-
# Note: Here we cannot use --docker, as is recomended, since the generated
12+
# Note: Here we cannot use --docker, as is recommended, since the generated
1313
# json directory does not allow linking package.json executable files
1414
FROM base AS pruner
1515
COPY . .

apps/playground/Dockerfile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM node:iron AS base
2+
WORKDIR /app
3+
ENV PNPM_HOME="/pnpm"
4+
ENV PATH="$PNPM_HOME:$PATH"
5+
ENV NODE_OPTIONS="--max-old-space-size=8192"
6+
RUN corepack enable
7+
RUN pnpm install -g turbo@latest
8+
9+
# PRUNE WORKSPACE
10+
# Note: Here we cannot use --docker, as is recommended, since the generated
11+
# json directory does not allow linking package.json executable files
12+
FROM base AS pruner
13+
COPY . .
14+
RUN turbo prune @opendatacapture/playground
15+
16+
# INSTALL DEPENDENCIES AND BUILD
17+
FROM base AS builder
18+
COPY tsconfig.base.json vitest.config.ts vitest.workspace.ts ./
19+
COPY --from=pruner /app/out/ .
20+
RUN pnpm install --frozen-lockfile
21+
RUN turbo build --filter=@opendatacapture/playground
22+
23+
# SERVE PLAYGROUND
24+
FROM base AS runner
25+
RUN pnpm install -g [email protected]
26+
COPY --from=builder /app/apps/playground/dist ./
27+
CMD [ "http-server", "-s", "-p", "80", "-P", "http://localhost:80?", "--gzip", "." ]

apps/playground/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
"private": true,
66
"license": "Apache-2.0",
77
"scripts": {
8-
"build": "tsc && env-cmd -f ../../.env pnpm exec vite build",
8+
"build": "tsc && pnpm exec vite build",
99
"deploy": "rsync -r dist/* [email protected]:/home/unrjos/www/playground.opendatacapture.org",
10-
"dev": "NODE_ENV=development env-cmd -f ../../.env pnpm exec vite",
10+
"dev": "NODE_ENV=development pnpm exec vite",
1111
"format": "prettier --write src",
1212
"lint": "tsc && eslint --fix src",
13-
"storybook": "env-cmd -f ../../.env storybook dev -p 6006"
13+
"storybook": "storybook dev -p 6006"
1414
},
1515
"dependencies": {
1616
"@douglasneuroinformatics/libcrypto": "catalog:",

apps/web/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ RUN corepack enable
88
RUN pnpm install -g turbo@latest
99

1010
# PRUNE WORKSPACE
11-
# Note: Here we cannot use --docker, as is recomended, since the generated
11+
# Note: Here we cannot use --docker, as is recommended, since the generated
1212
# json directory does not allow linking package.json executable files
1313
FROM base AS builder
1414
COPY . .

docker-compose.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ services:
1515
profiles:
1616
- '' #load by default without having to specify docker compose --profile
1717
- gateway
18+
- fullstack
1819
api:
1920
image: ghcr.io/douglasneuroinformatics/open-data-capture-api:${RELEASE_CHANNEL}
2021
build:
@@ -46,6 +47,7 @@ services:
4647
- 80
4748
profiles:
4849
- '' #load by default without having to specify docker compose --profile
50+
- fullstack
4951
gateway:
5052
image: ghcr.io/douglasneuroinformatics/open-data-capture-gateway:${RELEASE_CHANNEL}
5153
build:
@@ -60,6 +62,7 @@ services:
6062
profiles:
6163
- '' #load by default without having to specify docker compose --profile
6264
- gateway
65+
- fullstack
6366
restart: unless-stopped
6467
environment:
6568
- NODE_ENV=production
@@ -86,6 +89,7 @@ services:
8689
- 80
8790
profiles:
8891
- '' #load by default without having to specify docker compose --profile
92+
- fullstack
8993
restart: unless-stopped
9094
mongo:
9195
image: mongo:${MONGODB_VERSION}
@@ -105,3 +109,16 @@ services:
105109
- ./mongo/data:/data/db
106110
profiles:
107111
- '' #load by default without having to specify docker compose --profile
112+
- fullstack
113+
playground:
114+
build:
115+
context: .
116+
dockerfile: ./apps/playground/Dockerfile
117+
environment:
118+
- NODE_ENV=production
119+
ports:
120+
- '3750:80'
121+
restart: unless-stopped
122+
profiles:
123+
- fullstack
124+
- playground

0 commit comments

Comments
 (0)