Skip to content

Commit

Permalink
config: add env network when create new container
Browse files Browse the repository at this point in the history
  • Loading branch information
minhtri6179 committed Mar 21, 2024
1 parent 0e7fd1b commit bc49eb4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ DB_URL=postgresql://root:secret@localhost:5432/toeic?sslmode=disable
DB_on_cloud=secret

postgres:
docker run --name postgres12 -p 5432:5432 -e POSTGRES_USER=root -e POSTGRES_PASSWORD=secret -d postgres:12-alpine
docker run --name dbceito --network ceito -p 5432:5432 -e POSTGRES_USER=root -e POSTGRES_PASSWORD=secret -d postgres:12-alpine

createdb:
docker exec -it postgres12 createdb --username=root --owner=root toeic
docker exec -it dbceito createdb --username=root --owner=root toeic

dropdb:
docker exec -it postgres12 dropdb toeic
docker exec -it dbceito dropdb toeic

migrateup:
migrate -path db/migrations -database "${DB_URL}" -verbose up
Expand Down

0 comments on commit bc49eb4

Please sign in to comment.