Skip to content

Commit

Permalink
add dev medusa
Browse files Browse the repository at this point in the history
  • Loading branch information
anteprimorac committed Nov 21, 2023
1 parent 8f3663e commit 6a7e0df
Show file tree
Hide file tree
Showing 17 changed files with 1,239 additions and 0 deletions.
17 changes: 17 additions & 0 deletions dev/medusa/.babelrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
let ignore = [`**/dist`, "**/medusa-plugin-wordpress"];

// Jest needs to compile this code, but generally we don't want this copied
// to output folders
if (process.env.NODE_ENV !== `test`) {
ignore.push(`**/__tests__`);
}

/**
* Define typescript type for `.babelrc.js` file
* @type {import('@babel/core').TransformOptions | import('@babel/core').ConfigFunction}
*/
module.exports = {
presets: [["babel-preset-medusa-package"], ["@babel/preset-typescript"]],
plugins: [["@babel/plugin-proposal-decorators", { "legacy": true }]],
ignore,
};
4 changes: 4 additions & 0 deletions dev/medusa/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist
node_modules

npm-debug.log
10 changes: 10 additions & 0 deletions dev/medusa/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true

[*.{js,json,yml}]
charset = utf-8
indent_style = space
indent_size = 2
8 changes: 8 additions & 0 deletions dev/medusa/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
DATABASE_URL=postgres://postgres:postgres@localhost:5432/medusa-docker
REDIS_URL=redis://localhost
NODE_ENV=development
JWT_SECRET=supersecret
COOKIE_SECRET=supersecret
PORT=9000
STRIPE_API_KEY=
STRIPE_WEBHOOK_SECRET=
7 changes: 7 additions & 0 deletions dev/medusa/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.cache
/build
/dist
/uploads

/docker/postgresql/data
!/docker/postgresql/.gitkeep
19 changes: 19 additions & 0 deletions dev/medusa/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM node:20

WORKDIR /app/medusa

COPY package.json .
COPY package-lock.json .
COPY develop.sh .

RUN apt-get update

RUN apt-get install -y python

RUN npm i -g @medusajs/medusa-cli@latest

RUN npm i

COPY . .

ENTRYPOINT ["sh", "./develop.sh"]
1 change: 1 addition & 0 deletions dev/medusa/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# medusa
Loading

0 comments on commit 6a7e0df

Please sign in to comment.