Skip to content

Commit b9d3177

Browse files
authored
Update bin (#14)
1 parent 9528ed2 commit b9d3177

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

bin/db.thor.rb

+3-2
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,16 @@ def start
1616
run("docker network create notes-bridge-docker-network", capture: true)
1717
run("docker volume create notes-data-volume", capture: true)
1818

19+
# --publish 5432:5432 \
20+
1921
run(
2022
<<~CMD.gsub(/\s+/, " ").strip,
2123
docker run --rm --detach --name notes-db \
22-
--publish 5432:5432 \
2324
--env POSTGRES_HOST_AUTH_METHOD=trust \
2425
--network notes-bridge-docker-network \
2526
--env PGDATA=/var/lib/postgresql/data/pgdata \
2627
-v notes-data-volume:/var/lib/postgresql/data:delegated \
27-
--detach postgres:14.10
28+
postgres:14.10
2829
CMD
2930
capture: true
3031
)

bin/web.thor.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def self.exit_on_failure?
1515
desc "build", "Builds the app"
1616
def build
1717
say "Building the app"
18-
run("docker build -t notes .", capture: true)
18+
run("docker build -t workanywhere/notes:latest .", capture: true)
1919

2020
run("docker network create notes-bridge-docker-network", capture: true)
2121
end
@@ -26,7 +26,7 @@ def start
2626
run(
2727
<<~CMD.gsub(/\s+/, " ").strip,
2828
docker run --rm --name notes-web \
29-
--publish 3000:3000 \
29+
--publish 4005:3000 \
3030
--env POSTGRES_HOST_AUTH_METHOD=trust \
3131
--env DATABASE_URL=postgres://postgres@notes-db:5432/notes_development \
3232
--env RAILS_ENV=development \
@@ -39,7 +39,7 @@ def start
3939
-v #{Dir.pwd}/config:/rails/config:delegated \
4040
-v #{Dir.pwd}/lib:/rails/lib:delegated \
4141
-v #{Dir.pwd}/db:/rails/db:delegated
42-
notes:latest
42+
workanywhere/notes:latest
4343
CMD
4444
capture: false
4545
)

0 commit comments

Comments
 (0)