-
-
Notifications
You must be signed in to change notification settings - Fork 389
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into map-buttons-motuz
- Loading branch information
Showing
237 changed files
with
6,396 additions
and
8,883 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM alpine | ||
|
||
RUN apk add --no-cache curl jq | ||
|
||
RUN curl -L https://fly.io/install.sh | FLYCTL_INSTALL=/usr/local sh | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
RUN chmod +x /entrypoint.sh | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: "Destroy fly.io app" | ||
description: "Destroy fly.io app if matching app name found" | ||
author: iSCJT | ||
branding: | ||
icon: "delete" | ||
color: "red" | ||
runs: | ||
using: "docker" | ||
image: "Dockerfile" | ||
inputs: | ||
name: | ||
description: Fly app name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/sh -l | ||
|
||
set -ex | ||
|
||
# Change underscores to hyphens. | ||
app="${INPUT_NAME//_/-}" | ||
|
||
|
||
if ! flyctl status --app "$app"; then | ||
echo "App name not found" | ||
exit 1 | ||
fi | ||
|
||
flyctl apps destroy "$app" -y | ||
echo "App $app successfully destroyed" | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Destroy Fly PR Preview | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- unlabeled | ||
|
||
env: | ||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | ||
|
||
jobs: | ||
label_removed: | ||
if: github.event.label.name == 'Review allow-preview ✅' | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
concurrency: | ||
group: pr-${{ github.event.number }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
# pull the repo from the pull request source, not the default local repo | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- name: Destroy fly.io preview app | ||
id: destroy | ||
uses: ./.github/actions/destroy-fly-preview-app | ||
with: | ||
name: community-platform-pr-${{ github.event.number }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Remove PR Preview Label | ||
on: | ||
# Run this workflow on every PR event. Existing review apps will be updated when the PR is updated. | ||
pull_request_target: | ||
# Trigger when labels are changed or more commits added to a PR that contains labels | ||
types: [closed] | ||
|
||
jobs: | ||
preview_app: | ||
if: contains(github.event.pull_request.labels.*.name, 'Review allow-preview ✅') | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
# Only run one deployment at a time per PR. | ||
concurrency: | ||
group: pr-${{ github.event.number }} | ||
|
||
steps: | ||
- name: Get code | ||
uses: actions/checkout@v4 | ||
with: | ||
# pull the repo from the pull request source, not the default local repo | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- name: Remove preview label | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
await github.rest.issues.removeLabel({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: github.event.number, | ||
name: 'Review allow-preview ✅', | ||
}); | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# syntax = docker/dockerfile:1 | ||
|
||
FROM node:20-slim AS base | ||
|
||
LABEL fly_launch_runtime="Remix" | ||
|
||
# Remix app lives here | ||
WORKDIR /app | ||
|
||
# Set production environment | ||
ENV NODE_ENV="production" | ||
ARG YARN_VERSION=3.6.4 | ||
|
||
# Install Yarn 3 | ||
RUN corepack enable && \ | ||
yarn set version ${YARN_VERSION} | ||
|
||
# Throw-away build stage to reduce size of final image | ||
FROM base AS build | ||
|
||
# Install packages needed to build node modules | ||
RUN apt-get update -qq && \ | ||
apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3 | ||
|
||
# Copy source code | ||
COPY . . | ||
|
||
# Install packages | ||
RUN yarn install | ||
|
||
RUN echo "VITE_SITE_VARIANT=\"preview\"" >> .env && \ | ||
echo "VITE_GA_TRACKING_ID=\"G-G4QQ9NSQPC\"" >> .env && \ | ||
echo "VITE_PATREON_CLIENT_ID=\"RLgZo7SKNVn8cOyFlYeGZsNnoCOjvzQiNJFskDfoxltZltjPPGNMPokwJckHNphU\"" >> .env && \ | ||
echo "VITE_THEME=\"precious-plastic\"" >> .env && \ | ||
echo "VITE_PLATFORM_PROFILES=\"member,workspace,community-builder,collection-point,machine-builder\"" >> .env | ||
|
||
# Build application | ||
RUN yarn run build | ||
|
||
# Final stage for app image | ||
FROM base | ||
|
||
# Copy built application | ||
COPY --from=build /app /app | ||
|
||
# Start the server by default, this can be overwritten at runtime | ||
EXPOSE 3000 | ||
CMD [ "yarn", "run", "start" ] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
app = 'community-platform-ff' | ||
primary_region = 'cdg' | ||
primary_region = 'ams' | ||
|
||
[build] | ||
|
||
[http_service] | ||
internal_port = 3000 | ||
force_https = true | ||
auto_stop_machines = 'off' | ||
processes = ['app'] | ||
internal_port = 3000 | ||
force_https = true | ||
auto_stop_machines = 'suspend' | ||
min_machines_running = 1 | ||
processes = ['app'] | ||
|
||
[env] | ||
VITE_BRANCH = "production" | ||
VITE_BRANCH = "production" | ||
|
||
[[vm]] | ||
memory = '4gb' | ||
cpu_kind = 'shared' | ||
cpus = 4 | ||
memory = '4gb' | ||
cpu_kind = 'shared' | ||
cpus = 4 |
Oops, something went wrong.