This repository was archived by the owner on Feb 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docker): add docker and pgadmin to local docker-compose
- Loading branch information
Showing
25 changed files
with
407 additions
and
1,319 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 |
---|---|---|
|
@@ -173,4 +173,6 @@ src/backend/*.db | |
*.local | ||
screenshots/ | ||
PAT.txt | ||
dist | ||
dist | ||
db-data/ | ||
pgadmin-data/ |
Empty file.
Empty file.
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 |
---|---|---|
|
@@ -169,8 +169,13 @@ docker-compose -f docker-compose.yml -f local-docker-compose.yml build | |
|
||
# Run the container in detached mode to return your command prompt | ||
docker-compose -f docker-compose.yml -f local-docker-compose.yml up -d backend | ||
|
||
# Migrate the database to the initial schema using alembic | ||
docker-compose -f docker-compose.yml -f local-docker-compose.yml -p sfm exec backend alembic upgrade head | ||
``` | ||
|
||
You can visit the backend by opening a browser to the address <http://localhost:8181>. You can open a gui to see data in your running postgres database by visiting <http://localhost:8182>. Login with the username `[email protected]` and the password `root`. | ||
|
||
<!-- | ||
``` | ||
# Check the status of your container. | ||
|
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
This file was deleted.
Oops, something went wrong.
Binary file not shown.
53 changes: 0 additions & 53 deletions
53
src/backend/alembic/versions/1d3daaeebc36_first_migration.py
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-1.28 KB
src/backend/alembic/versions/__pycache__/1d3daaeebc36_first_migration.cpython-38.pyc
Binary file not shown.
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 @@ | ||
Generic single-database configuration with an async dbapi. |
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,86 @@ | ||
"""init | ||
Revision ID: 29f3e3aaae5b | ||
Revises: | ||
Create Date: 2021-11-18 19:21:18.627686 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
import sqlmodel | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = "29f3e3aaae5b" | ||
down_revision = None | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table( | ||
"project", | ||
sa.Column("name", sqlmodel.sql.sqltypes.AutoString(), nullable=False), | ||
sa.Column("repo_url", sqlmodel.sql.sqltypes.AutoString(), nullable=False), | ||
sa.Column("on_prem", sa.Boolean(), nullable=True), | ||
sa.Column("lead_name", sqlmodel.sql.sqltypes.AutoString(), nullable=True), | ||
sa.Column("lead_email", sqlmodel.sql.sqltypes.AutoString(), nullable=True), | ||
sa.Column("description", sqlmodel.sql.sqltypes.AutoString(), nullable=True), | ||
sa.Column("location", sqlmodel.sql.sqltypes.AutoString(), nullable=True), | ||
sa.Column("github_id", sa.Integer(), nullable=True), | ||
sa.Column("id", sa.Integer(), nullable=True), | ||
sa.Column( | ||
"project_auth_token_hashed", | ||
sqlmodel.sql.sqltypes.AutoString(), | ||
nullable=False, | ||
), | ||
sa.PrimaryKeyConstraint("id"), | ||
) | ||
op.create_index(op.f("ix_project_id"), "project", ["id"], unique=False) | ||
op.create_table( | ||
"workitem", | ||
sa.Column("category", sqlmodel.sql.sqltypes.AutoString(), nullable=False), | ||
sa.Column("start_time", sa.DateTime(), nullable=True), | ||
sa.Column("end_time", sa.DateTime(), nullable=True), | ||
sa.Column("failed", sa.Boolean(), nullable=True), | ||
sa.Column("comments", sqlmodel.sql.sqltypes.AutoString(), nullable=True), | ||
sa.Column("issue_num", sa.Integer(), nullable=True), | ||
sa.Column("duration_open", sa.Integer(), nullable=True), | ||
sa.Column("project_id", sa.Integer(), nullable=True), | ||
sa.Column("id", sa.Integer(), nullable=True), | ||
sa.ForeignKeyConstraint( | ||
["project_id"], | ||
["project.id"], | ||
), | ||
sa.PrimaryKeyConstraint("id"), | ||
) | ||
op.create_index(op.f("ix_workitem_id"), "workitem", ["id"], unique=False) | ||
op.create_table( | ||
"commit", | ||
sa.Column("sha", sqlmodel.sql.sqltypes.AutoString(), nullable=False), | ||
sa.Column("date", sa.DateTime(), nullable=True), | ||
sa.Column("message", sqlmodel.sql.sqltypes.AutoString(), nullable=True), | ||
sa.Column("author", sqlmodel.sql.sqltypes.AutoString(), nullable=True), | ||
sa.Column("work_item_id", sa.Integer(), nullable=True), | ||
sa.Column("id", sa.Integer(), nullable=False), | ||
sa.Column("time_to_pull", sa.Integer(), nullable=False), | ||
sa.ForeignKeyConstraint( | ||
["work_item_id"], | ||
["workitem.id"], | ||
), | ||
sa.PrimaryKeyConstraint("id"), | ||
) | ||
op.create_index(op.f("ix_commit_id"), "commit", ["id"], unique=False) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_index(op.f("ix_commit_id"), table_name="commit") | ||
op.drop_table("commit") | ||
op.drop_index(op.f("ix_workitem_id"), table_name="workitem") | ||
op.drop_table("workitem") | ||
op.drop_index(op.f("ix_project_id"), table_name="project") | ||
op.drop_table("project") | ||
# ### end Alembic commands ### |
Oops, something went wrong.