Skip to content

Commit

Permalink
fix(ci): set base href for Angular build to /pub/wfprev/
Browse files Browse the repository at this point in the history
  • Loading branch information
yzlucas committed Oct 10, 2024
1 parent d5f725b commit 9053ecd
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 28 deletions.
62 changes: 62 additions & 0 deletions db/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# WFPrev Local PostGIS Setup

This guide will help you build a local instance of PostGIS, set up the database, and apply the model using Liquibase from the change log.

## Prerequisites

- Docker installed on your local machine.
- `Dockerfile.liquibase.local`, `main-changelog.json`, and the `scripts` folder available in your repository.

## Project Structure

- **`main-changelog.json`**: The main Liquibase changelog file, which includes the following changes:
- Creates logins using SQL scripts.
- Creates roles.
- Creates the `wfprev` schema.
- Adds required extensions.
- **`Dockerfile.liquibase.local`**: Dockerfile for running Liquibase commands.
- **`scripts` folder**: Contains the SQL scripts for various database changes as referenced in `main-changelog.json`.

## Step 1: Pull and Run PostGIS

1. **Pull the PostGIS Image**:

```bash
docker pull postgis/postgis:16-3.4

2. **Run the PostGIS Containe**:

```bash
docker run --name wfprev-postgres -e POSTGRES_USER=wfprev -e POSTGRES_PASSWORD=password -p 5432:5432 -d postgis/postgis:16-3.4
## Step 2: Find the IP Address
1. **Get the Container ID:** :
docker ps
2. **Inspect the Container for IP Address:** :
docker inspect <container_id>
## Step 3: Set Up and Run Liquibase
1. **Build the Liquibase Docker Image** :
Create a Dockerfile.liquibase.local with the following content:
FROM liquibase/liquibase
COPY ./scripts ./scripts
COPY ./main-changelog*.json .
COPY ./liquibase.properties .
ENTRYPOINT [ "sh", "-c", "liquibase $COMMAND $TARGET_LIQUIBASE_TAG --changelog-file=$CHANGELOG_FILE -Dschemaname=$SCHEMA_NAME" ]
Build the Liquibase Docker image:
docker build -t liquibase -f Dockerfile.liquibase.local .
2. ** Run Liquibase Update:**:
docker run --rm liquibase \
--url=jdbc:postgresql://<your_postgis_ip>:5432/wfprev \
--changelog-file=main-changelog.json \
--username=wfprev \
--password=password \
update
28 changes: 0 additions & 28 deletions db/README.txt

This file was deleted.

0 comments on commit 9053ecd

Please sign in to comment.