Skip to content

Commit

Permalink
v2 initial
Browse files Browse the repository at this point in the history
  • Loading branch information
w41x committed Mar 24, 2024
1 parent bc9bda5 commit f4ccf19
Show file tree
Hide file tree
Showing 18 changed files with 239 additions and 1,286 deletions.
9 changes: 4 additions & 5 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
.github
.idea
.turbo

node_modules
dist

.gitignore

docker-compose.yml
Dockerfile

Makefile

README.md
pnpm-lock.yaml

tsconfig.tsbuildinfo
README.md
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.idea
.turbo

node_modules
dist
Expand Down
15 changes: 0 additions & 15 deletions .swcrc

This file was deleted.

21 changes: 9 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,19 @@ LABEL name='api build'
# enable pnpm
RUN corepack enable
RUN corepack prepare pnpm@8.15.5 --activate
# set user and working directory and copy all project files
# set user and working directory and copy all relevant project files
USER node
WORKDIR /home/node/workspace
COPY --chown=node . .
COPY --chown=node package.json .
COPY --chown=node dist dist
COPY --chown=node dev dev
WORKDIR /home/node/workspace/dev
# install node modules for plugin
RUN pnpm install --force
ENV PATH /home/node/workspace/dev/node_modules/.bin:$PATH
# set environment variables
ENV NODE_ENV development
# install node modules for plugin
# RUN pnpm install
# ENV PATH /home/node/workspace/node_modules/.bin:$PATH
# build plugin
# RUN pnpm run build
# set working directory for test environment
WORKDIR /home/node/workspace/dev
# install node module for test environment
RUN pnpm install
ENV PATH /home/node/workspace/dev/node_modules/.bin:$PATH
ENV PAYLOAD_CONFIG_PATH src/config/payload.config.ts
# set internal port
EXPOSE 3000
# start test environment
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
build:
pnpm clean && pnpm build

start:
docker compose up
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
plugin for [Payload CMS](https://payloadcms.com), which enables bidirectional relationships

works with PayloadCMS v2 and v3!!!

This is the branch for v2!
4 changes: 3 additions & 1 deletion dev/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ node_modules

.gitignore

Makefile
Makefile

pnpm-lock.yaml
5 changes: 2 additions & 3 deletions dev/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"name": "payload-bidirectional-relationships-plugin-dev",
"version": "0.1.4-v2",
"version": "0.2.0-v2",
"description": "development environment for payload-bidirectional-relationships-plugin",
"license": "MIT",
"type": "module",
"author": {
"name": "WALX Tech e.K.",
"email": "x@walx.tech",
Expand Down Expand Up @@ -41,7 +40,7 @@
"@payloadcms/bundler-webpack": "^1.0.6",
"@payloadcms/db-mongodb": "^1.4.3",
"@payloadcms/richtext-lexical": "^0.7.0",
"payload-bidirectional-relationships-plugin": "0.1.4-v2",
"payload-bidirectional-relationships-plugin": "file:..",
"express": "^4.19.0",
"payload": "^2.11.2"
},
Expand Down
Loading

0 comments on commit f4ccf19

Please sign in to comment.