-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #499 from sharafdin/feature/support-docker
Docker support for all templates
- Loading branch information
Showing
79 changed files
with
1,053 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
packages/yonode-templates/JS-MongoDB-Mongoose-Auth-Template/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM node:21 | ||
|
||
EXPOSE 8000 | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
RUN npm install -g pnpm | ||
|
||
RUN npm install -g nodemon | ||
|
||
RUN pnpm install | ||
|
||
CMD ["nodemon", "-L", "./src/app.js"] |
33 changes: 33 additions & 0 deletions
33
packages/yonode-templates/JS-MongoDB-Mongoose-Auth-Template/docker-compose.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
version: '3.9' | ||
|
||
services: | ||
db: | ||
image: mongo:latest | ||
container_name: mongo-db | ||
ports: | ||
- '27017:27017' | ||
restart: on-failure | ||
# healthcheck: | ||
# test: echo 'db.stats().ok' | mongo localhost:27017/test --quiet | ||
# interval: 10s | ||
# timeout: 5s | ||
# retries: 5 | ||
|
||
|
||
server: | ||
build: . | ||
container_name: yonode-server | ||
restart: on-failure | ||
volumes: | ||
- .:/app | ||
- /app/node_modules | ||
ports: | ||
- '8000:8000' | ||
environment: | ||
DATABASE_URL: ${DATABASE_URL} | ||
SERVER_PORT: ${SERVER_PORT} | ||
JWT_SECRET_KEY: ${JWT_SECRET_KEY} | ||
NODE_ENVIRONMENT: ${NODE_ENVIRONMENT} | ||
depends_on: | ||
- db | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM node:21 | ||
|
||
EXPOSE 8000 | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
RUN npm install -g pnpm | ||
|
||
RUN npm install -g nodemon | ||
|
||
RUN pnpm install | ||
|
||
CMD ["nodemon", "-L", "./src/app.js"] |
36 changes: 36 additions & 0 deletions
36
packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template/docker-compose.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
version: '3.9' | ||
|
||
services: | ||
db: | ||
image: mongo:latest | ||
container_name: mongo-db | ||
ports: | ||
- '27017:27017' | ||
environment: | ||
MONGO_INITDB_ROOT_USERNAME: root | ||
MONGO_INITDB_ROOT_PASSWORD: toor | ||
restart: on-failure | ||
# healthcheck: | ||
# test: echo 'db.stats().ok' | mongo localhost:27017/test --quiet | ||
# interval: 10s | ||
# timeout: 5s | ||
# retries: 5 | ||
|
||
|
||
server: | ||
build: . | ||
container_name: yonode-server | ||
restart: on-failure | ||
volumes: | ||
- .:/app | ||
- /app/node_modules | ||
ports: | ||
- '8000:8000' | ||
environment: | ||
DATABASE_URL: ${DATABASE_URL} | ||
SERVER_PORT: ${SERVER_PORT} | ||
JWT_SECRET_KEY: ${JWT_SECRET_KEY} | ||
NODE_ENVIRONMENT: ${NODE_ENVIRONMENT} | ||
depends_on: | ||
- db | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
packages/yonode-templates/JS-MongoDB-Prisma-Auth-Template/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM node:21 | ||
|
||
EXPOSE 8000 | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
RUN npm install -g pnpm | ||
|
||
RUN npm install -g nodemon | ||
|
||
RUN pnpm install | ||
|
||
RUN npx prisma generate | ||
|
||
CMD ["nodemon", "-L", "./src/app.js"] |
36 changes: 36 additions & 0 deletions
36
packages/yonode-templates/JS-MongoDB-Prisma-Auth-Template/docker-compose.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
version: '3.9' | ||
|
||
services: | ||
db: | ||
image: mongo:latest | ||
container_name: mongo-db | ||
ports: | ||
- '27017:27017' | ||
environment: | ||
MONGO_INITDB_ROOT_USERNAME: root | ||
MONGO_INITDB_ROOT_PASSWORD: toor | ||
restart: on-failure | ||
# healthcheck: | ||
# test: echo 'db.stats().ok' | mongo localhost:27017/test --quiet | ||
# interval: 10s | ||
# timeout: 5s | ||
# retries: 5 | ||
|
||
|
||
server: | ||
build: . | ||
container_name: yonode-server | ||
restart: on-failure | ||
volumes: | ||
- .:/app | ||
- /app/node_modules | ||
ports: | ||
- '8000:8000' | ||
environment: | ||
DATABASE_URL: ${DATABASE_URL} | ||
SERVER_PORT: ${SERVER_PORT} | ||
JWT_SECRET_KEY: ${JWT_SECRET_KEY} | ||
NODE_ENVIRONMENT: ${NODE_ENVIRONMENT} | ||
depends_on: | ||
- db | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM node:21 | ||
|
||
EXPOSE 8000 | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
RUN npm install -g pnpm | ||
|
||
RUN npm install -g nodemon | ||
|
||
RUN pnpm install | ||
|
||
RUN npx prisma generate | ||
|
||
CMD ["nodemon", "-L", "./src/app.js"] |
36 changes: 36 additions & 0 deletions
36
packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/docker-compose.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
version: '3.9' | ||
|
||
services: | ||
db: | ||
image: mongo:latest | ||
container_name: mongo-db | ||
ports: | ||
- '27017:27017' | ||
environment: | ||
MONGO_INITDB_ROOT_USERNAME: root | ||
MONGO_INITDB_ROOT_PASSWORD: toor | ||
restart: on-failure | ||
# healthcheck: | ||
# test: echo 'db.stats().ok' | mongo localhost:27017/test --quiet | ||
# interval: 10s | ||
# timeout: 5s | ||
# retries: 5 | ||
|
||
|
||
server: | ||
build: . | ||
container_name: yonode-server | ||
restart: on-failure | ||
volumes: | ||
- .:/app | ||
- /app/node_modules | ||
ports: | ||
- '8000:8000' | ||
environment: | ||
DATABASE_URL: ${DATABASE_URL} | ||
SERVER_PORT: ${SERVER_PORT} | ||
JWT_SECRET_KEY: ${JWT_SECRET_KEY} | ||
NODE_ENVIRONMENT: ${NODE_ENVIRONMENT} | ||
depends_on: | ||
- db | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
packages/yonode-templates/JS-MongoDB-TypeORM-Auth-Template/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM node:21 | ||
|
||
EXPOSE 8000 | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
RUN npm install -g pnpm | ||
|
||
RUN npm install -g nodemon | ||
|
||
RUN pnpm install | ||
|
||
CMD ["nodemon", "-L", "./src/app.js"] |
36 changes: 36 additions & 0 deletions
36
packages/yonode-templates/JS-MongoDB-TypeORM-Auth-Template/docker-compose.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
version: '3.9' | ||
|
||
services: | ||
db: | ||
image: mongo:latest | ||
container_name: mongo-db | ||
ports: | ||
- '27017:27017' | ||
environment: | ||
MONGO_INITDB_ROOT_USERNAME: root | ||
MONGO_INITDB_ROOT_PASSWORD: toor | ||
restart: on-failure | ||
# healthcheck: | ||
# test: echo 'db.stats().ok' | mongo localhost:27017/test --quiet | ||
# interval: 10s | ||
# timeout: 5s | ||
# retries: 5 | ||
|
||
|
||
server: | ||
build: . | ||
container_name: yonode-server | ||
restart: on-failure | ||
volumes: | ||
- .:/app | ||
- /app/node_modules | ||
ports: | ||
- '8000:8000' | ||
environment: | ||
DATABASE_URL: ${DATABASE_URL} | ||
SERVER_PORT: ${SERVER_PORT} | ||
JWT_SECRET_KEY: ${JWT_SECRET_KEY} | ||
NODE_ENVIRONMENT: ${NODE_ENVIRONMENT} | ||
depends_on: | ||
- db | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.