-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
97 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
API_URL="https://admin.topwr.solvro.pl/graphql" | ||
ASSETS_URL="https://admin.topwr.solvro.pl/assets" | ||
IPARKING_URL="https://iparking.pwr.edu.pl" | ||
FIREBASE_NAME="CHANGE_ME" | ||
FIREBASE_CLIENT_ID="CHANGE_ME" | ||
FIREBASE_PRIVATE_KEY="CHANGE_ME" | ||
FIREBASE_EMAIL="CHANGE_ME" |
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,52 @@ | ||
name: Deploy | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Add envs | ||
run: cp .env.example .env | ||
|
||
- name: Add firebase config | ||
run: echo "${{ secrets.FIREBASE_CONFIG }}" > base64 --decode > lib/firebase_options.dart | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
push: true | ||
tags: ghcr.io/Solvro/web-topwr-sci-clubs-form:latest | ||
cache-from: type=registry,ref=ghcr.io/Solvro/web-topwr-sci-clubs-form:latest | ||
cache-to: type=inline | ||
network: host | ||
|
||
- name: Trigger build | ||
run: | | ||
curl --request GET '${{ secrets.COOLIFY_WEBHOOK }}' --header 'Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}' |
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 |
---|---|---|
|
@@ -152,6 +152,7 @@ app.*.symbols | |
.env | ||
*.env.dev | ||
.env.dev | ||
!.env.example | ||
env.g.dart | ||
**/env.g.dart | ||
|
||
|
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 @@ | ||
# Install Operating system and dependencies | ||
FROM ubuntu:20.04 AS build | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y curl git wget unzip libgconf-2-4 gdb libstdc++6 libglu1-mesa fonts-droid-fallback python3 | ||
RUN apt-get clean | ||
|
||
ENV DEBIAN_FRONTEND=dialog | ||
|
||
# download Flutter SDK from Flutter Github repo | ||
RUN git clone https://github.com/flutter/flutter.git /usr/local/flutter | ||
|
||
# Set flutter environment path | ||
ENV PATH="/usr/local/flutter/bin:/usr/local/flutter/bin/cache/dart-sdk/bin:${PATH}" | ||
|
||
# Run flutter doctor | ||
RUN flutter doctor | ||
|
||
# Enable flutter web | ||
RUN flutter channel stable | ||
RUN flutter upgrade | ||
RUN flutter config --enable-web | ||
|
||
# Copy files to container and build | ||
RUN mkdir /app/ | ||
COPY . /app/ | ||
WORKDIR /app/ | ||
RUN dart run build_runner build -d | ||
RUN flutter build web --web-renderer html | ||
|
||
FROM socialengine/nginx-spa:latest | ||
COPY --chown=nginx:nginx --from=build ./build/web /app | ||
EXPOSE 80 |
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