Skip to content

Commit

Permalink
Fix database inital migration
Browse files Browse the repository at this point in the history
  • Loading branch information
KenwoodFox committed Jul 19, 2024
1 parent e632ece commit ef67af6
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 41 deletions.
53 changes: 53 additions & 0 deletions docker-compose-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
services:
db:
image: postgres:10.5
restart: "always"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=project_hud_db
healthcheck:
test:
["CMD", "pg_isready", "-q", "-d", "project_hud_db", "-U", "postgres"]
interval: 10s
timeout: 5s
retries: 5
logging:
options:
max-size: 10m
max-file: "3"
ports:
- "5438:5432"
volumes:
- /opt/project_hud/postgres:/var/lib/postgresql/data

# pgadmin:
# image: dpage/pgadmin4
# container_name: pgadmin4_container
# restart: no
# ports:
# - "8888:80"
# environment:
# PGADMIN_DEFAULT_EMAIL: [email protected]
# PGADMIN_DEFAULT_PASSWORD: iamnotacrook
# volumes:
# - /opt/project_hud/pgadmin:/var/lib/pgadmin

watchtower:
image: containrrr/watchtower
restart: "always"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /root/.docker/config.json:/config.json
command: --interval 30

project_hud:
image: ghcr.io/frc-1721/project_hud-bot:feat-builds
depends_on:
db:
condition: service_healthy
ports:
- "5000:5000"
environment:
TZ: America/New_York
restart: "always"
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
"""Revert db to stock
"""Initial migration
Revision ID: 252b14a16837
Revises: 69dde7217528
Create Date: 2024-07-19 13:01:03.413846
Revision ID: 65d52e31576c
Revises:
Create Date: 2024-07-19 14:23:41.925886
"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '252b14a16837'
down_revision = '69dde7217528'
revision = '65d52e31576c'
down_revision = None
branch_labels = None
depends_on = None

Expand Down
35 changes: 0 additions & 35 deletions migrations/versions/69dde7217528_inital_migration.py

This file was deleted.

0 comments on commit ef67af6

Please sign in to comment.