diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..871cb81 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d86ba23 --- /dev/null +++ b/Dockerfile @@ -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;"] \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..57ae11e --- /dev/null +++ b/docker-compose.yaml @@ -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