Skip to content

Commit

Permalink
ci: Container for dev had wrong name, and a few other fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesread committed Sep 10, 2024
1 parent fda68fb commit f2a2179
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
10 changes: 7 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# We want the docker builds to be clean, and as fast as possible. Don't send
# any half-built stuff in the build context as a pre-caution (also saves copying
# 180k files in node_modules that isn't used!).
node_modules
**/node_modules
dist
.nx
.devcontainer
.git
*.md
**/.git
**/dist
**/*.md
**/LICENSE
**/npm-debug.log
**/*.vscode
8 changes: 6 additions & 2 deletions .github/workflows/build-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- '*'

jobs:
build-tag:
build-containers:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -30,10 +30,14 @@ jobs:
run: |
echo "DATE=$(date +'%s')" >> "$GITHUB_ENV"
- name: Print post-build debug info
run: |
docker images
- name: docker tag
run: |
docker tag localhost/postiz ghcr.io/gitroomhq/postiz-app:${{ env.DATE }}
docker push ghcr.io/gitroomhq/postiz-app:${{ env.DATE }}
docker tag localhost/postiz-devcontainer ghcr.io/gitroomhq/postiz-app:${{ env.DATE }}
docker tag localhost/postiz-devcontainer ghcr.io/gitroomhq/postiz-devcontainer:${{ env.DATE }}
docker push ghcr.io/gitroomhq/postiz-devcontainer:${{ env.DATE }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ Thumbs.db

# Next.js
.next

# Vim files
**/*.swp
**/*.swo
2 changes: 1 addition & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This Dockerfile is used for producing 3 container images.
# This Dockerfile is used for producing 3 container images.
#
# base - which is thrown away, that contains node and the basic infrastructure.
# devcontainer - which is used for development, and contains the source code and the node_modules.
Expand Down
2 changes: 2 additions & 0 deletions var/docker/docker-build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -o xtrace

docker rmi localhost/postiz || true
docker build --target dist -t localhost/postiz -f Dockerfile.dev .
docker build --target devcontainer -t localhost/postiz-devcontainer -f Dockerfile.dev .

0 comments on commit f2a2179

Please sign in to comment.