Skip to content

Commit

Permalink
Merge pull request #12 from stevensblueprint/ci/docker
Browse files Browse the repository at this point in the history
Dockerfile and docker-compose
  • Loading branch information
miguel-merlin authored Feb 28, 2024
2 parents fcd8740 + 830861e commit 34feaa6
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: build

on:
push:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Push Docker Image
uses: docker/build-push-action@v4
with:
push: true
tags: |
ghcr.io/stevensblueprint/blueprint_admin:${{ github.sha }}
ghcr.io/stevensblueprint/blueprint_admin:latest
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM node:20-alpine as builder
WORKDIR /src
COPY package.json ./
RUN npm install
COPY . .
RUN npm run build
FROM nginx:alpine
COPY --from=builder /src/build /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
24 changes: 24 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: '3.8'

services:
user_management:
restart: always
labels:
- "com.centurylinklabs.watchtower.scope=admin"
image: ghcr.io/stevensblueprint/user_management:latest
ports:
- "172.17.0.1:8080:8080"
blueprint_admin:
restart: always
labels:
- "com.centurylinklabs.watchtower.scope=admin"
image: ghcr.io/stevensblueprint/blueprint_admin:latest
ports:
- "172.17.0.1:3005:80"
wt:
image: containrrr/watchtower
labels:
- "com.centurylinklabs.watchtower.scope=admin"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: --interval 30 --scope admin

0 comments on commit 34feaa6

Please sign in to comment.