-
Notifications
You must be signed in to change notification settings - Fork 0
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 #12 from stevensblueprint/ci/docker
Dockerfile and docker-compose
- Loading branch information
Showing
3 changed files
with
58 additions
and
0 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,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 |
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-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;"] |
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,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 |