Skip to content
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
37 changes: 37 additions & 0 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build and Push to DockerHub

on:
release:
types: [published]

env:
REGISTRY: docker.io
IMAGE_NAME: appwrite/mailcatcher
TAG: ${{ github.event.release.tag_name }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v3

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Base
FROM alpine:3.15 as base
FROM alpine:3.22 AS base
LABEL maintainer="team@appwrite.io"

ENV NODE_ENV production
ENV NODE_ENV=production
RUN apk --upgrade add --no-cache nodejs openssl

# Build
FROM base as build
FROM base AS build

WORKDIR /root
RUN apk --upgrade add --no-cache curl git npm
RUN git clone https://github.com/maildev/maildev.git \
RUN git clone --branch v2.2.1 https://github.com/maildev/maildev.git \
&& mkdir build \
&& cp maildev/package*.json build

Expand All @@ -21,7 +21,7 @@ RUN npm install \
&& rm package*.json

# Prod
FROM base as prod
FROM base AS prod

RUN adduser node -D
USER node
Expand Down