Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Container for dev had wrong name, and a few other fixes #228

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 .