Added Dockerfile
This commit is contained in:
+6
-1
@@ -2,4 +2,9 @@ JWT_SECRET=something
|
|||||||
COOKIE_SECRET=something
|
COOKIE_SECRET=something
|
||||||
|
|
||||||
DATABASE_TYPE="postgres"
|
DATABASE_TYPE="postgres"
|
||||||
REDIS_URL=redis://localhost:6379
|
REDIS_URL=redis://redis:6379
|
||||||
|
|
||||||
|
DATABASE_URL=postgres://postgres:123456@localhost/medusa-TBcY
|
||||||
|
MEDUSA_ADMIN_ONBOARDING_TYPE=nextjs
|
||||||
|
STORE_CORS=http://localhost:8000,http://localhost:7001
|
||||||
|
MEDUSA_ADMIN_ONBOARDING_NEXTJS_DIRECTORY=my-medusa-store-storefront
|
||||||
|
|||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
FROM node:20-alpine
|
||||||
|
|
||||||
|
RUN apk add curl
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY package.json .
|
||||||
|
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
CMD [ "npm", "run", "dev" ]
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
|
||||||
|
version: '3.8'
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: ./Dockerfile
|
||||||
|
environment:
|
||||||
|
- MEDUSA_ADMIN_ONBOARDING_NEXTJS_DIRECTORY=/medusa-frontend
|
||||||
|
volumes:
|
||||||
|
- ./medusa-frontend:/medusa-frontend
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- 9000:9000
|
||||||
|
depends_on:
|
||||||
|
- postgres
|
||||||
|
- redis
|
||||||
|
|
||||||
|
postgres:
|
||||||
|
image: postgres:14
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: "123456"
|
||||||
|
POSTGRES_DB: medusa-TBcY
|
||||||
|
volumes:
|
||||||
|
- ./postgres-data:/var/lib/postgresql/data
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis:latest
|
||||||
|
restart: always
|
||||||
|
volumes:
|
||||||
|
- ./redis-data:/data
|
||||||
+3
-3
@@ -55,7 +55,7 @@ const plugins = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
const modules = {
|
const modules = {
|
||||||
/*eventBus: {
|
eventBus: {
|
||||||
resolve: "@medusajs/event-bus-redis",
|
resolve: "@medusajs/event-bus-redis",
|
||||||
options: {
|
options: {
|
||||||
redisUrl: REDIS_URL
|
redisUrl: REDIS_URL
|
||||||
@@ -66,7 +66,7 @@ const modules = {
|
|||||||
options: {
|
options: {
|
||||||
redisUrl: REDIS_URL
|
redisUrl: REDIS_URL
|
||||||
}
|
}
|
||||||
},*/
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @type {import('@medusajs/medusa').ConfigModule["projectConfig"]} */
|
/** @type {import('@medusajs/medusa').ConfigModule["projectConfig"]} */
|
||||||
@@ -77,7 +77,7 @@ const projectConfig = {
|
|||||||
database_url: DATABASE_URL,
|
database_url: DATABASE_URL,
|
||||||
admin_cors: ADMIN_CORS,
|
admin_cors: ADMIN_CORS,
|
||||||
// Uncomment the following lines to enable REDIS
|
// Uncomment the following lines to enable REDIS
|
||||||
// redis_url: REDIS_URL
|
redis_url: REDIS_URL
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @type {import('@medusajs/medusa').ConfigModule} */
|
/** @type {import('@medusajs/medusa').ConfigModule} */
|
||||||
|
|||||||
Reference in New Issue
Block a user