diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index 7a2fe62..0000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "Dev Container", - "dockerComposeFile": "docker-compose.yml", - "service": "devcontainer", - "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", - - "features": { - "ghcr.io/va-h/devcontainers-features/uv:1": { - "version": "latest" - }, - "ghcr.io/itsmechlark/features/postgresql:1": { - "version": "latest" - }, - "ghcr.io/devcontainers/features/github-cli:1": {}, - "ghcr.io/devcontainers/features/node:1": { - "version": "18" - } - }, - - "forwardPorts": [5000, 8081], - - "containerEnv": { - "DATABASE_URL": "postgresql://postgres:postgres@db:5432/postgres", - "EXPO_PUBLIC_API_URL": "http://localhost:5000/api" - }, - - "postCreateCommand": "bash ${containerWorkspaceFolder}/.devcontainer/scripts/post-create.sh", - "postStartCommand": "bash ${containerWorkspaceFolder}/.devcontainer/scripts/post-start.sh", - - "remoteUser": "root", - - "customizations": { - "vscode": { - "extensions": [ - "ms-python.python", - "charliermarsh.ruff", - "dbaeumer.vscode-eslint", - "esbenp.prettier-vscode" - ] - } - } -} diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml deleted file mode 100644 index 7af07b5..0000000 --- a/.devcontainer/docker-compose.yml +++ /dev/null @@ -1,24 +0,0 @@ -services: - devcontainer: - image: mcr.microsoft.com/devcontainers/base:noble - volumes: - - ../..:/workspaces:cached - - frontend-node-modules:/workspaces/${localWorkspaceFolderBasename}/frontend/node_modules - command: sleep infinity - ports: - - "5000:5000" - - "8081:8081" - - db: - image: postgres:latest - restart: unless-stopped - volumes: - - postgres-data:/var/lib/postgresql/data - environment: - POSTGRES_PASSWORD: postgres - POSTGRES_USER: postgres - POSTGRES_DB: postgres - -volumes: - postgres-data: - frontend-node-modules: \ No newline at end of file diff --git a/.devcontainer/scripts/post-create.sh b/.devcontainer/scripts/post-create.sh deleted file mode 100755 index 9232e2c..0000000 --- a/.devcontainer/scripts/post-create.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash - -WORKSPACE_ROOT="/workspaces/pharmacy-app" - -if [ ! -f "${WORKSPACE_ROOT}/backend/.env" ]; then - echo "Setting up environment variables..." - - read -p "Enter Gmail address: " email - echo "Enter Gmail app password: " - read -s password - echo - - cat > "${WORKSPACE_ROOT}/backend/.env" << ENVEOF -SECRET_KEY=$(openssl rand -base64 32) -TOKEN_SECRET_KEY=$(openssl rand -base64 32) -MAIL_SERVER=smtp.gmail.com -MAIL_PORT=587 -MAIL_USE_TLS=True -MAIL_USERNAME=$email -MAIL_PASSWORD=$password -MAIL_DEFAULT_SENDER=$email -ENVEOF -fi - -if [ -f "${WORKSPACE_ROOT}/frontend/package.json" ]; then - echo "Installing frontend dependencies..." - cd "${WORKSPACE_ROOT}/frontend" - npm install -else - echo "Error: ${WORKSPACE_ROOT}/frontend/package.json not found" -fi - -if [ -f "${WORKSPACE_ROOT}/backend/pyproject.toml" ]; then - echo "Installing backend dependencies..." - cd "${WORKSPACE_ROOT}/backend" - uv sync -else - echo "Error: ${WORKSPACE_ROOT}/backend/pyproject.toml not found" -fi \ No newline at end of file diff --git a/.devcontainer/scripts/post-start.sh b/.devcontainer/scripts/post-start.sh deleted file mode 100755 index 4c94efe..0000000 --- a/.devcontainer/scripts/post-start.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -WORKSPACE_ROOT="/workspaces/pharmacy-app" - -if [ -f "${WORKSPACE_ROOT}/backend/pyproject.toml" ]; then - echo "Running database migrations..." - cd "${WORKSPACE_ROOT}/backend" - uv run flask db upgrade - uv run flask seed products -else - echo "Error: ${WORKSPACE_ROOT}/backend/pyproject.toml not found" -fi \ No newline at end of file