-
-
Notifications
You must be signed in to change notification settings - Fork 2
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 #326 from shawakash/mail_server
feat: docker for mail and mail-zeus
- Loading branch information
Showing
6 changed files
with
138 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Deploy backend-mail | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
pull_request: | ||
branches: | ||
- dev | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: "mv docker/mail/Dockerfile ." | ||
|
||
- name: add secrets | ||
env: | ||
DOCKER_USER: ${{secrets.DOCKERHUB_USERNAME}} | ||
DOCKER_PASSWORD: ${{secrets.DOCKERHUB_TOKEN}} | ||
run: | | ||
cd backend/api | ||
touch .env | ||
cd ../.. | ||
- name: docker login | ||
env: | ||
DOCKER_USER: ${{secrets.DOCKERHUB_USERNAME}} | ||
DOCKER_PASSWORD: ${{secrets.DOCKERHUB_TOKEN}} | ||
run: | | ||
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD | ||
- name: Build the Docker image | ||
run: docker build . --tag shawakash/paybox-mail:${{ github.sha }} | ||
|
||
- name: Docker Push | ||
run: docker push shawakash/paybox-mail:${{ github.sha }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Use the official Node.js image as the base image | ||
FROM node:21 | ||
|
||
WORKDIR /base | ||
|
||
COPY ["package.json", "./package.json"] | ||
COPY [".yarnrc", "./.yarnrc"] | ||
COPY [".npmrc", "./.npmrc"] | ||
COPY [".eslintrc.js", "./.eslintrc.js"] | ||
COPY ["turbo.json", "./turbo.json"] | ||
COPY ["yarn.lock", "./yarn.lock"] | ||
COPY ["tsconfig.json", "./tsconfig.json"] | ||
|
||
COPY ["packages/typescript-config", "./packages/typescript-config"] | ||
COPY ["packages/eslint-config", "./packages/teslint-config"] | ||
COPY ["backend/mail-zeus", "./backend/mail-zeus"] | ||
|
||
RUN cd /base | ||
RUN yarn install | ||
RUN yarn run build | ||
|
||
WORKDIR /base/backend/mail-zeus | ||
|
||
CMD ["yarn", "zeus"] | ||
CMD ["yarn", "codegen"] | ||
CMD ["yarn", "dev"] | ||
|
||
|
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,28 @@ | ||
FROM node:21 | ||
|
||
WORKDIR /base | ||
|
||
COPY ["package.json", "./package.json"] | ||
COPY [".yarnrc", "./.yarnrc"] | ||
COPY [".npmrc", "./.npmrc"] | ||
COPY [".eslintrc.js", "./.eslintrc.js"] | ||
COPY ["turbo.json", "./turbo.json"] | ||
COPY ["yarn.lock", "./yarn.lock"] | ||
COPY ["tsconfig.json", "./tsconfig.json"] | ||
|
||
COPY ["packages/typescript-config", "./packages/typescript-config"] | ||
COPY ["packages/eslint-config", "./packages/eslint-config"] | ||
COPY ["packages/common", "./packages/common"] | ||
COPY ["backend/mail-zeus", "./backend/mail-zeus"] | ||
COPY ["backend/mail", "./backend/mail"] | ||
|
||
|
||
RUN cd /base | ||
RUN yarn install | ||
RUN yarn run build | ||
|
||
EXPOSE 25 | ||
|
||
WORKDIR /base/backend/mail | ||
|
||
CMD ["yarn", "dev"] |
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,19 @@ | ||
version: 0.2 | ||
|
||
env: | ||
secrets-manager: | ||
|
||
|
||
phases: | ||
install: | ||
runtime-versions: | ||
nodejs: 21 | ||
build: | ||
commands: | ||
- mv docker/mail/Dockerfile . | ||
- cd backend/mail | ||
- touch .env | ||
- cd ../.. | ||
artifacts: | ||
files: | ||
- '**/*' |
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,9 @@ | ||
version: "3.8" | ||
|
||
services: | ||
backendapi: | ||
image: shawakash/paybox-mail:{{tag}} | ||
restart: unless-stopped | ||
ports: | ||
- 25:25 | ||
command: "yarn dev" |