-
Notifications
You must be signed in to change notification settings - Fork 5
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 #93 from mateuszmigas/configure_docker
Configure docker
- Loading branch information
Showing
8 changed files
with
3,219 additions
and
2,419 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,14 @@ | ||
node_modules | ||
.git | ||
.gitignore | ||
.github | ||
docs | ||
dist | ||
e2e | ||
playwright-report | ||
test-results | ||
*.md | ||
apps/desktop | ||
core | ||
assets | ||
.vscode |
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,39 @@ | ||
name: Publish Docker Image | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish-docker: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "18" | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
version: 9.2.0 | ||
|
||
- name: Build image | ||
run: pnpm build:web:docker | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build and push image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
push: true | ||
tags: mateuszmigas/painting-droid:latest | ||
|
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,34 @@ | ||
# Stage 1: Build the static files | ||
FROM node:20-slim AS build-stage | ||
|
||
# Set up pnpm environment | ||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
|
||
# Enable corepack | ||
RUN corepack enable | ||
|
||
# Copy the application files | ||
COPY . /app | ||
|
||
# Set working directory | ||
WORKDIR /app | ||
|
||
# Install dependencies and build the app | ||
RUN pnpm install --frozen-lockfile | ||
RUN pnpm run build:web | ||
|
||
# Stage 2: Serve the static files using Nginx | ||
FROM nginx:alpine AS production-stage | ||
|
||
# Copy the build output to the Nginx HTML directory | ||
COPY --from=build-stage /app/apps/web/dist /usr/share/nginx/html | ||
|
||
# Expose port 80 | ||
EXPOSE 80 | ||
|
||
# Start Nginx | ||
CMD ["nginx", "-g", "daemon off;"] | ||
|
||
# Healthcheck to ensure the service is running | ||
HEALTHCHECK CMD wget -q -O /dev/null http://localhost || exit 1 |
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 |
---|---|---|
|
@@ -2,10 +2,12 @@ | |
"name": "painting-droid", | ||
"version": "0.2.17", | ||
"description": "", | ||
"packageManager": "[email protected]", | ||
"scripts": { | ||
"dev:web": "pnpm --filter @painting-droid/web run dev", | ||
"dev:desktop": "pnpm --filter @painting-droid/desktop run dev", | ||
"build:web": "pnpm --filter @painting-droid/web run build", | ||
"build:web:docker": "docker build -t mateuszmigas/painting-droid .", | ||
"build:desktop": "pnpm --filter @painting-droid/desktop run build", | ||
"build:core": "pnpm --filter @painting-droid/core run build", | ||
"validate": "pnpm -r validate" | ||
|
@@ -17,3 +19,4 @@ | |
"pnpm": ">=3" | ||
} | ||
} | ||
|
Oops, something went wrong.