Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try fix app docker image #13

Merged
merged 3 commits into from
Mar 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .do/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
github:
branch: 'main'
deploy_on_push: true
repo: 'tix-factory/push-notifications-demo'
repo: 'tix-factory/push-notifications'
health_check:
http_path: '/health'
http_port: 80
Expand All @@ -34,7 +34,7 @@ static_sites:
github:
branch: 'main'
deploy_on_push: true
repo: 'tix-factory/push-notifications-demo'
repo: 'tix-factory/push-notifications'
source_dir: 'services/app'
output_dir: 'build'
build_command: 'npm run build'
Expand Down
38 changes: 26 additions & 12 deletions libs/js/push-notifications/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion libs/js/push-notifications/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"build": "tsc"
},
"dependencies": {
"peerDependencies": {
"@types/react": "^18.0.28",
"react": "^18.2.0"
},
Expand Down
2 changes: 1 addition & 1 deletion services/api/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup Label="AssemblyMetadata">
<Company>Tix Factory</Company>
<RepositoryUrl>https://github.com/tix-factory/push-notifications-demo</RepositoryUrl>
<RepositoryUrl>https://github.com/tix-factory/push-notifications</RepositoryUrl>
<RepositoryType>git</RepositoryType>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public async Task<ActionResult> SendPushNotification(CancellationToken cancellat
Title = "Hello, world!",
Message = "This notification was sent using the push API.",
Link = new Uri("https://demo.push-notifications.app?notification_clicked=true"),
ButtonLink = new Uri("https://github.com/tix-factory/push-notifications-demo/issues"),
ButtonLink = new Uri("https://github.com/tix-factory/push-notifications/issues"),
Icon = new Uri("https://cdn.jsdelivr.net/gh/twitter/twemoji@v14.0.2/assets/72x72/1f514.png")
};

Expand Down
17 changes: 12 additions & 5 deletions services/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
# Setup runtime images
FROM node:19 AS base

# Setup build image
FROM node:19 AS build
# Setup image to build the published module with
FROM node:19 AS build-module

# Copy files over
COPY ./services/app ./services/app
# Copy the files over
COPY ./libs/js ./libs/js

# Install the module packages
# Install the packages
WORKDIR /libs/js/push-notifications
RUN npm ci

# Build the module
RUN npm run build

# Setup build image
FROM node:19 AS build

# Copy files over
COPY --from=build-module /libs/js/push-notifications/dist /libs/js/push-notifications/dist
COPY --from=build-module /libs/js/push-notifications/package.json /libs/js/push-notifications/package.json
COPY ./services/app ./services/app

# Install the packages
WORKDIR /services/app
RUN npm ci
Expand Down
10 changes: 4 additions & 6 deletions services/app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.