Skip to content

Commit e555868

Browse files
Merge pull request #12 from careagain-org/dev
Dev
2 parents 363aee1 + 177f6b0 commit e555868

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+3505
-1754
lines changed

.github/workflows/build.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,15 @@ jobs:
4848
SUPABASE_S3_BUCKET=${{ secrets.SUPABASE_S3_BUCKET}}
4949
SUPABASE_S3_SECRET_ACCESS_KEY=${{ secrets.SUPABASE_S3_SECRET_ACCESS_KEY}}
5050
SUPABASE_URL=${{ secrets.SUPABASE_URL}}
51-
API_URL=${{ secrets.API_URL}}
52-
WEB_URL=${{ secrets.WEB_URL }}
53-
FRONTEND_PORT=${{ secrets.FRONTEND_PORT }}
54-
BACKEND_PORT=${{ secrets.BACKEND_PORT }}
51+
REFLEX_API_URL=${{ secrets.REFLEX_API_URL}}
52+
REFLEX_WEB_URL=${{ secrets.REFLEX_WEB_URL }}
53+
REFLEX_FRONTEND_PORT=${{ secrets.REFLEX_FRONTEND_PORT }}
54+
REFLEX_BACKEND_PORT=${{ secrets.REFLEX_BACKEND_PORT }}
55+
CLERK_PUBLIC_KEY=${{ secrets.CLERK_PUBLIC_KEY }}
56+
CLERK_SECRET_KEY=${{ secrets.CLERK_SECRET_KEY }}
57+
JWT_KEY=${{ secrets.JWT_KEY }}
58+
CLERK_WEBHOOK_SECRET=${{ secrets.CLERK_WEBHOOK_SECRET }}
59+
SUPABASE_API_SECRET_KEY=${{ secrets.SUPABASE_API_SECRET_KEY }}
5560
EOF
5661
5762
- name: Build and push Docker image for linux/arm64

.github/workflows/deploy.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,16 @@ jobs:
4444
SUPABASE_URL=${{ secrets.SUPABASE_URL }}
4545
DOCKERHUB_TOKEN=${{ secrets.DOCKERHUB_TOKEN }}
4646
DOCKERHUB_USERNAME=${{ secrets.DOCKERHUB_USERNAME }}
47-
API_URL=${{ secrets.API_URL}}
48-
WEB_URL=${{ secrets.WEB_URL }}
49-
FRONTEND_PORT=${{ secrets.FRONTEND_PORT }}
50-
BACKEND_PORT=${{ secrets.BACKEND_PORT }}
47+
REFLEX_API_URL=${{ secrets.REFLEX_API_URL}}
48+
REFLEX_WEB_URL=${{ secrets.REFLEX_WEB_URL }}
49+
REFLEX_FRONTEND_PORT=${{ secrets.REFLEX_FRONTEND_PORT }}
50+
REFLEX_BACKEND_PORT=${{ secrets.REFLEX_BACKEND_PORT }}
51+
CLERK_PUBLIC_KEY=${{ secrets.CLERK_PUBLIC_KEY }}
52+
CLERK_SECRET_KEY=${{ secrets.CLERK_SECRET_KEY }}
53+
JWT_KEY=${{ secrets.JWT_KEY }}
54+
CLERK_WEBHOOK_SECRET=${{ secrets.CLERK_WEBHOOK_SECRET }}
55+
SUPABASE_API_SECRET_KEY=${{ secrets.SUPABASE_API_SECRET_KEY }}
56+
5157
EOF
5258
5359
- name: Create Ansible Vars file

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ RUN apt-get update && apt-get install -y \
1010
libpq-dev \
1111
gnupg \
1212
unzip \
13+
xclip \
14+
libxkbcommon-x11-0 \
1315
&& curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION} | bash - \
1416
&& apt-get install -y nodejs \
1517
&& apt-get clean \
1618
&& rm -rf /var/lib/apt/lists/*
1719

1820
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
19-
apt-get install -y xclip && \
2021
rm -rf /var/lib/apt/lists/*
2122

2223
# Install CA certs and dependencies
@@ -65,4 +66,4 @@ ENV REFLEX_DB_URL="sqlite:///reflex.db"
6566
STOPSIGNAL SIGKILL
6667

6768
# Always apply migrations before starting the backend.
68-
CMD ["sh", "-c", "reflex db migrate && reflex run --env prod --backend-only"]
69+
CMD ["sh", "-c", "reflex db makemigrations && reflex db migrate && reflex run --env prod --backend-only --loglevel debug"]

README.md

Lines changed: 0 additions & 158 deletions
This file was deleted.

alembic.ini

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ version_path_separator = os # Use os.pathsep. Default configuration used for ne
6161
# are written from script.py.mako
6262
# output_encoding = utf-8
6363

64-
sqlalchemy.url = driver://user:pass@localhost/dbname
65-
64+
sqlalchemy.url = ${{ secrets.SUPABASE_DB_URI }}
6665

6766
[post_write_hooks]
6867
# post_write_hooks defines scripts or Python functions that are run

alembic/env.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# for 'autogenerate' support
2525
# from myapp import mymodel
2626
# target_metadata = mymodel.Base.metadata
27-
target_metadata = Base.metadata
27+
target_metadata = [Base.metadata]
2828

2929
# other values from the config, defined by the needs of env.py,
3030
# can be acquired:
@@ -57,7 +57,8 @@ def run_migrations_offline() -> None:
5757

5858
def include_object(object, name, type_, reflected, compare_to):
5959
if type_ == "table":
60-
return object.schema == "careagain_schema"
60+
return object.schema == f"{os.environ.get('SUPABASE_DB_SCHEMA')}"
61+
6162
return True
6263

6364

@@ -80,6 +81,7 @@ def run_migrations_online() -> None:
8081
connection=connection,
8182
target_metadata=target_metadata,
8283
compare_type=True,
84+
compare_server_default=True,
8385
include_schemas=True,
8486
version_table_schema=f"{os.environ.get('SUPABASE_DB_SCHEMA')}",
8587
include_object=include_object,

alembic/versions/version.txt

Whitespace-only changes.

docker-compose.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,32 @@ services:
44
build:
55
context: .
66
dockerfile: Dockerfile
7+
volumes:
8+
- /tmp/.X11-unix:/tmp/.X11-unix
9+
tty: true
710
image: careagain/careagain-webapp:latest
811
env_file:
912
- .env
1013
ports:
1114
- 3000:3000
1215
dns:
1316
- 1.1.1.1
14-
command: reflex run --env prod --frontend-only
17+
command: reflex run --frontend-only --loglevel debug
1518
depends_on:
1619
- app
1720
app:
1821
platform: linux/arm64
1922
build:
2023
context: .
2124
dockerfile: Dockerfile
25+
volumes:
26+
- /tmp/.X11-unix:/tmp/.X11-unix
27+
tty: true
2228
image: careagain/careagain-webapp:latest
2329
env_file:
2430
- .env
2531
ports:
2632
- 8000:8000
2733
dns:
2834
- 1.1.1.1
35+
command: reflex run --backend-only --loglevel debug

0 commit comments

Comments
 (0)