Skip to content

Commit 7513391

Browse files
authored
Merge pull request #3317 from SeedCompany/docker-gql-schema
2 parents 39cf851 + 83b48ad commit 7513391

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

Dockerfile

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ ARG NODE_VERSION=20
22
ARG NODE_IMAGE=public.ecr.aws/docker/library/node:${NODE_VERSION}-slim
33
ARG EDGEDB_IMAGE=ghcr.io/edgedb/edgedb:5
44

5-
FROM ${NODE_IMAGE} as base-runtime
5+
FROM ${NODE_IMAGE} AS base-runtime
66

77
# Install these native packages
88
RUN apt-get update \
@@ -19,10 +19,17 @@ RUN apt-get update \
1919
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.edgedb.com | sh -s -- -y --no-modify-path \
2020
&& mv /root/.local/bin/edgedb /usr/local/bin/edgedb
2121

22+
23+
# Apollo Rover CLI
24+
RUN curl -sSL https://rover.apollo.dev/nix/latest | sh
25+
26+
# GraphQL Hive CLI
27+
RUN curl -sSL https://graphql-hive.com/install.sh | sh
28+
2229
# Enable yarn via corepack
2330
RUN corepack enable
2431

25-
FROM ${EDGEDB_IMAGE} as builder
32+
FROM ${EDGEDB_IMAGE} AS builder
2633

2734
# region Install NodeJS
2835
ARG NODE_VERSION
@@ -93,14 +100,17 @@ EOF
93100
# Build server
94101
RUN yarn build
95102

103+
# Generate GraphQL schema
104+
RUN yarn start -- --gen-schema
105+
96106
# Remove non-production files
97107
RUN rm -rf nest-cli.json tsconfig* test
98108
# Remove dev dependencies
99109
RUN yarn workspaces focus --all --production
100110
# Remove yarn cache to reduce image size
101111
RUN yarn cache clean --all
102112

103-
FROM base-runtime as runtime
113+
FROM base-runtime AS runtime
104114

105115
WORKDIR /opt/cord-api
106116

0 commit comments

Comments
 (0)