-
Notifications
You must be signed in to change notification settings - Fork 11
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 #32 from rosewang01/main
merge updated dockerize changes
- Loading branch information
Showing
9 changed files
with
98 additions
and
32 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,41 @@ | ||
name: Create and publish the Docker image | ||
on: | ||
push: | ||
branches: ['main'] | ||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
- name: Build and push client Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./client | ||
push: true | ||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:client | ||
labels: ${{ steps.meta.outputs.labels }} | ||
- name: Build and push server Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./server | ||
push: true | ||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:server | ||
labels: ${{ steps.meta.outputs.labels }} |
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,12 @@ | ||
FROM node:19.6.0 | ||
LABEL org.opencontainers.image.source=https://github.com/rosewang01/dockerize-boilerplate | ||
LABEL org.opencontainers.image.description="Boilerplate Client Side Container" | ||
LABEL org.opencontainers.image.licenses=MIT | ||
WORKDIR / | ||
COPY ./package.json /package.json | ||
COPY ./public /public | ||
COPY ./src /src | ||
RUN yarn config set network-timeout 600000 -g | ||
RUN yarn install | ||
EXPOSE 3000 | ||
CMD ["yarn","client"] |
This file was deleted.
Oops, something went wrong.
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
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,10 @@ | ||
FROM node:20.0.0 | ||
LABEL org.opencontainers.image.source=https://github.com/rosewang01/dockerize-boilerplate | ||
LABEL org.opencontainers.image.description="Boilerplate Server Side Container" | ||
LABEL org.opencontainers.image.licenses=MIT | ||
WORKDIR / | ||
COPY ./package.json ./package.json | ||
COPY ./src ./src | ||
RUN yarn install | ||
EXPOSE 4000 | ||
CMD ["yarn", "server"] |
This file was deleted.
Oops, something went wrong.
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