Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

Commit

Permalink
Adding docker builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ineiti committed Aug 23, 2023
1 parent e6d6855 commit a646732
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build docker
on:
push:

jobs:
# This is copied from https://docs.github.com/en/actions/publishing-packages/publishing-docker-images
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image for nodes
id: build-and-push
uses: docker/build-push-action@v4
with:
context: backend
push: true
tags: ghcr.io/c4dt/service-stainless-backend:latest

- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v4
with:
context: webapp
push: true
tags: ghcr.io/c4dt/service-stainless-webapp:latest
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ services:
- CONODE_SERVICE_PATH=/config
- DEBUG_COLOR=true
demo:
image: c4dt/service-stainless-demo:latest
image: c4dt/service-stainless-webapp:latest
build:
context: webapp
network_mode: host
Expand Down
2 changes: 1 addition & 1 deletion webapp/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine AS builder
FROM node:14-alpine AS builder

WORKDIR /webapp

Expand Down

0 comments on commit a646732

Please sign in to comment.