53 lines
1.6 KiB
YAML
53 lines
1.6 KiB
YAML
|
# conventions for volumes on docker is to use underscore
|
||
|
volumes:
|
||
|
pnpm_cache: {}
|
||
|
|
||
|
# conventions for services in docker is to use hyphen
|
||
|
services:
|
||
|
devtools:
|
||
|
image: monorepo/devtools:latest
|
||
|
build:
|
||
|
context: .
|
||
|
dockerfile_inline: |
|
||
|
FROM golang:latest AS go
|
||
|
ENV GOBIN /go/bin
|
||
|
|
||
|
RUN go install github.com/nokia/addlicense@latest
|
||
|
RUN go install filippo.io/mkcert@latest
|
||
|
|
||
|
FROM node:20
|
||
|
WORKDIR /opt/monorepo
|
||
|
VOLUME /opt/pnpm
|
||
|
|
||
|
# pnpm
|
||
|
RUN npm install -g pnpm && pnpm config set store-dir /opt/pnpm
|
||
|
|
||
|
# go binaries
|
||
|
COPY --from=go /go/bin/addlicense /usr/bin/addlicense
|
||
|
COPY --from=go /go/bin/mkcert /usr/bin/mkcert
|
||
|
|
||
|
# jq
|
||
|
RUN apt update && apt upgrade -y
|
||
|
RUN apt install -y jq
|
||
|
|
||
|
# cargo
|
||
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||
|
|
||
|
# node
|
||
|
COPY package.json package.json
|
||
|
COPY pnpm-lock.yaml pnpm-lock.yaml
|
||
|
COPY pnpm-workspace.yaml pnpm-workspace.yaml
|
||
|
COPY api/package.json api/package.json
|
||
|
COPY assets/i18n/package.json assets/i18n/package.json
|
||
|
COPY assets/images/package.json assets/images/package.json
|
||
|
COPY docs/internal/package.json docs/internal/package.json
|
||
|
COPY docs/public/package.json docs/public/package.json
|
||
|
COPY infra/charts/package.json infra/charts/package.json
|
||
|
COPY infra/images/package.json infra/images/package.json
|
||
|
COPY infra/provisioning/package.json infra/provisioning/package.json
|
||
|
|
||
|
ENTRYPOINT "/bin/bash"
|
||
|
command: pnpm install
|
||
|
volumes:
|
||
|
- pnpm_cache:/opt/pnpm
|