Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 13 additions & 4 deletions .github/workflows/post-release-push-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,39 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: true

- name: Set up QEMU (for multi-arch builds)
uses: docker/setup-qemu-action@v3

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

- name: Log in to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

# All-in-one Image Steps
# All-in-one Image Steps (multi-arch: amd64 + arm64)
- name: Extract metadata (tags, labels) for All-in-one Docker
id: meta_all_in_one
uses: docker/metadata-action@v3
uses: docker/metadata-action@v5
with:
images: daveearley/hi.events-all-in-one
tags: |
type=ref,event=tag
type=raw,value=latest,enable=${{ github.event.release.prerelease == false }}

- name: Build and push All-in-one Docker image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: ./
file: ./Dockerfile.all-in-one
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta_all_in_one.outputs.tags }}
labels: ${{ steps.meta_all_in_one.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

# Backend Image Steps
- name: Extract metadata (tags, labels) for Backend Docker
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ prompts/

/playground/**
/playground/

/plans/**
/plans
13 changes: 10 additions & 3 deletions Dockerfile.all-in-one
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,26 @@ WORKDIR /app/frontend

RUN apk add --no-cache yarn

# Increase network timeout for slow ARM emulation builds
RUN yarn config set network-timeout 600000

COPY ./frontend/package.json ./frontend/yarn.lock ./

COPY ./frontend .

RUN yarn install && yarn build
RUN yarn install --network-timeout 600000 --frozen-lockfile && yarn build

FROM serversideup/php:beta-8.3.2-fpm-alpine
# Use stable multi-arch serversideup/php image
FROM serversideup/php:8.3-fpm-alpine

ENV PHP_OPCACHE_ENABLE=1

# Switch to root for installing extensions and packages
USER root

RUN install-php-extensions intl

RUN apk add --no-cache nodejs yarn nginx supervisor
RUN apk add --no-cache nodejs yarn nginx supervisor dos2unix

COPY --from=node-frontend /app/frontend /app/frontend

Expand Down
9 changes: 9 additions & 0 deletions backend/app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,19 @@

namespace HiEvents\Console;

use HiEvents\Jobs\Message\SendScheduledMessagesJob;
use HiEvents\Jobs\Waitlist\ProcessExpiredWaitlistOffersJob;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel
{
protected function schedule(Schedule $schedule): void
{
$schedule->job(new SendScheduledMessagesJob)->everyMinute()->withoutOverlapping();
$schedule->job(new ProcessExpiredWaitlistOffersJob)->everyMinute()->withoutOverlapping();
}

protected function commands(): void
{
$this->load(__DIR__ . '/Commands');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,9 @@ public function getPercentageApplicationFee(): float
{
return $this->getApplicationFees()['percentage'] ?? config('app.default_application_fee_percentage');
}

public function getApplicationFeeCurrency(): string
{
return $this->getApplicationFees()['currency'] ?? 'USD';
}
}
11 changes: 11 additions & 0 deletions backend/app/DomainObjects/Enums/CapacityChangeDirection.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace HiEvents\DomainObjects\Enums;

enum CapacityChangeDirection
{
use BaseEnum;

case INCREASED;
case DECREASED;
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ abstract class EventSettingDomainObjectAbstract extends \HiEvents\DomainObjects\
final public const HOMEPAGE_THEME_SETTINGS = 'homepage_theme_settings';
final public const PASS_PLATFORM_FEE_TO_BUYER = 'pass_platform_fee_to_buyer';
final public const ALLOW_ATTENDEE_SELF_EDIT = 'allow_attendee_self_edit';
final public const WAITLIST_ENABLED = 'waitlist_enabled';
final public const WAITLIST_AUTO_PROCESS = 'waitlist_auto_process';
final public const WAITLIST_OFFER_TIMEOUT_MINUTES = 'waitlist_offer_timeout_minutes';

protected int $id;
protected int $event_id;
Expand Down Expand Up @@ -119,6 +122,9 @@ abstract class EventSettingDomainObjectAbstract extends \HiEvents\DomainObjects\
protected array|string|null $homepage_theme_settings = null;
protected bool $pass_platform_fee_to_buyer = false;
protected bool $allow_attendee_self_edit = true;
protected bool $waitlist_enabled = false;
protected bool $waitlist_auto_process = false;
protected ?int $waitlist_offer_timeout_minutes = null;

public function toArray(): array
{
Expand Down Expand Up @@ -177,6 +183,9 @@ public function toArray(): array
'homepage_theme_settings' => $this->homepage_theme_settings ?? null,
'pass_platform_fee_to_buyer' => $this->pass_platform_fee_to_buyer ?? null,
'allow_attendee_self_edit' => $this->allow_attendee_self_edit ?? null,
'waitlist_enabled' => $this->waitlist_enabled ?? null,
'waitlist_auto_process' => $this->waitlist_auto_process ?? null,
'waitlist_offer_timeout_minutes' => $this->waitlist_offer_timeout_minutes ?? null,
];
}

Expand Down Expand Up @@ -774,4 +783,37 @@ public function getAllowAttendeeSelfEdit(): bool
{
return $this->allow_attendee_self_edit;
}

public function setWaitlistEnabled(bool $waitlist_enabled): self
{
$this->waitlist_enabled = $waitlist_enabled;
return $this;
}

public function getWaitlistEnabled(): bool
{
return $this->waitlist_enabled;
}

public function setWaitlistAutoProcess(bool $waitlist_auto_process): self
{
$this->waitlist_auto_process = $waitlist_auto_process;
return $this;
}

public function getWaitlistAutoProcess(): bool
{
return $this->waitlist_auto_process;
}

public function setWaitlistOfferTimeoutMinutes(?int $waitlist_offer_timeout_minutes): self
{
$this->waitlist_offer_timeout_minutes = $waitlist_offer_timeout_minutes;
return $this;
}

public function getWaitlistOfferTimeoutMinutes(): ?int
{
return $this->waitlist_offer_timeout_minutes;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ abstract class MessageDomainObjectAbstract extends \HiEvents\DomainObjects\Abstr
final public const UPDATED_AT = 'updated_at';
final public const DELETED_AT = 'deleted_at';
final public const ELIGIBILITY_FAILURES = 'eligibility_failures';
final public const SCHEDULED_AT = 'scheduled_at';

protected int $id;
protected int $event_id;
Expand All @@ -45,6 +46,7 @@ abstract class MessageDomainObjectAbstract extends \HiEvents\DomainObjects\Abstr
protected ?string $updated_at = null;
protected ?string $deleted_at = null;
protected array|string|null $eligibility_failures = null;
protected ?string $scheduled_at = null;

public function toArray(): array
{
Expand All @@ -66,6 +68,7 @@ public function toArray(): array
'updated_at' => $this->updated_at ?? null,
'deleted_at' => $this->deleted_at ?? null,
'eligibility_failures' => $this->eligibility_failures ?? null,
'scheduled_at' => $this->scheduled_at ?? null,
];
}

Expand Down Expand Up @@ -255,4 +258,15 @@ public function getEligibilityFailures(): array|string|null
{
return $this->eligibility_failures;
}

public function setScheduledAt(?string $scheduled_at): self
{
$this->scheduled_at = $scheduled_at;
return $this;
}

public function getScheduledAt(): ?string
{
return $this->scheduled_at;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ abstract class ProductDomainObjectAbstract extends \HiEvents\DomainObjects\Abstr
final public const START_COLLAPSED = 'start_collapsed';
final public const IS_HIGHLIGHTED = 'is_highlighted';
final public const HIGHLIGHT_MESSAGE = 'highlight_message';
final public const WAITLIST_ENABLED = 'waitlist_enabled';

protected int $id;
protected int $event_id;
Expand Down Expand Up @@ -63,6 +64,7 @@ abstract class ProductDomainObjectAbstract extends \HiEvents\DomainObjects\Abstr
protected bool $start_collapsed = false;
protected bool $is_highlighted = false;
protected ?string $highlight_message = null;
protected ?bool $waitlist_enabled = null;

public function toArray(): array
{
Expand Down Expand Up @@ -93,6 +95,7 @@ public function toArray(): array
'start_collapsed' => $this->start_collapsed ?? null,
'is_highlighted' => $this->is_highlighted ?? null,
'highlight_message' => $this->highlight_message ?? null,
'waitlist_enabled' => $this->waitlist_enabled ?? null,
];
}

Expand Down Expand Up @@ -381,4 +384,15 @@ public function getHighlightMessage(): ?string
{
return $this->highlight_message;
}

public function setWaitlistEnabled(?bool $waitlist_enabled): self
{
$this->waitlist_enabled = $waitlist_enabled;
return $this;
}

public function getWaitlistEnabled(): ?bool
{
return $this->waitlist_enabled;
}
}
Loading
Loading