Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: db changed to postgres #619

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions browser-extension/api-server/db/config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ module.exports = {
password: process.env.DB_PASSWORD,
database: "uli_dev",
host: process.env.DB_HOST,
dialect: "mysql",
dialect: "postgres",
},
test: {
username: "root",
password: null,
database: "uli_test",
host: "127.0.0.1",
dialect: "mysql",
dialect: "postgres",
},
production: {
username: process.env.DB_USERNAME,
password: process.env.DB_PASSWORD,
database: "uli_prod_unicode",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be picked up from the env too? process.env.DB_NAME perhaps?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eternaltyro hi, we have made that small change here - #620
is this the change you wanted?

host: process.env.DB_HOST,
dialect: "mysql",
dialect: "postgres",
},
};
233 changes: 137 additions & 96 deletions browser-extension/api-server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion browser-extension/api-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
"express": "4.18.2",
"multer": "1.4.5-lts.1",
"multer-s3": "3.0.1",
"mysql2": "3.6.3",
"password-generator": "2.3.2",
"pg": "^8.12.0",
"pg-hstore": "^2.3.4",
"sequelize": "6.35.1",
"sequelize-cli": "6.6.2",
"uuid": "9.0.1"
Expand Down
24 changes: 14 additions & 10 deletions browser-extension/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@ version: "3"

services:
db:
image: "mysql"
command: --default-authentication-plugin=mysql_native_password
image: postgres:14.10
restart: always
environment:
MYSQL_ROOT_PASSWORD: root_pw
MYSQL_USER: tattle
MYSQL_PASSWORD: tattle_pw
MYSQL_DATABASE: uli_dev
ports:
- 3306:3306
- POSTGRES_USER=tattle
- POSTGRES_PASSWORD=tattle_pw
- POSTGRES_DB=uli_dev
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
interval: 1s
timeout: 5s
retries: 10
volumes:
- "~/data/ogbv_plugin/db:/var/lib/mysql"
- ~/data/uli_test/postgres:/var/lib/postgresql/data
ports:
- 5432:5432
db_gui:
image: adminer
restart: always
Expand All @@ -27,10 +30,11 @@ services:
dockerfile: Dockerfile
depends_on:
- db
command: tail -f /dev/null
# command: tail -f /dev/null
ports:
- 3000:3000
volumes:
- "./api-server:/app"
- /app/node_modules
env_file:
- "./api-server/development.env"
Loading