Skip to content

AngelHack-APCS/hackhcmc_db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AngelHack Hackhcmc - Team AIO_APCS1 Database Repo

Introduction

This repository contains the database schema and data for our application.

Frontend

You can access our frontend server here

Database

You can access our backend server here

AI

You can access our AI service here

Prerequisites

Before you begin, ensure you have the following installed:

Getting Started

To use this Docker image, follow these steps:

  1. Clone the Repository
git clone <repository-url>
cd <repository-directory>
  1. Create an Environment File Create a file named .env in the root directory of the repository. Add your PostgreSQL configuration details in this file:
POSTGRES_DB=mydatabase
POSTGRES_USER=postgres
POSTGRES_PASSWORD=mysecretpassword
  1. Build the Docker Image
docker build -t my-postgres-image .
  1. Run the Docker Container Start a new container using the built image and the environment variables from the .env file:
docker run --name my-postgres-container -d -p 5432:5432 --env-file .env my-postgres-image
  • --name my-postgres-container: Assigns a name to the running container.
  • -d: Runs the container in detached mode (background).
  • -p 5432:5432: Maps port 5432 on your host to port 5432 in the container.
  • --env-file .env: Loads environment variables from the .env file.
  1. Verify and Connect Verify that the container is running:
docker ps
  1. Connect in Visual Studio Code

Install the extension SQLTools and connect to PostgreSQL following the above configurations.

Cleanup

To stop and remove the Docker container when you're done, use the following commands:

docker stop my-postgres-container
docker rm my-postgres-container
docker rmi my-postgres-image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published