File tree Expand file tree Collapse file tree 5 files changed +6
-8
lines changed Expand file tree Collapse file tree 5 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 1
1
SECRET_KEY_BASE = example
2
- DATABASE_USERNAME = rails_user
2
+ DATABASE_USERNAME = postgres
3
3
DATABASE_PASSWORD = secret
4
+ DATABASE_HOST = db
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ FROM base
44
44
45
45
# Install packages needed for deployment
46
46
RUN apt-get update -qq && \
47
- apt-get install --no-install-recommends -y curl libvips && \
47
+ apt-get install --no-install-recommends -y curl libvips libpq-dev && \
48
48
rm -rf /var/lib/apt/lists /var/cache/apt/archives
49
49
50
50
# Copy built artifacts: gems, application
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ default: &default
2
2
adapter : postgresql
3
3
pool : <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
4
4
username : <%= ENV["DATABASE_USERNAME"] %>
5
- password : <%= ENVs ["DATABASE_PASSWORD"] %>
5
+ password : <%= ENV ["DATABASE_PASSWORD"] %>
6
6
host : <%= ENV["DATABASE_HOST"] %>
7
7
port : 5432
8
8
timeout : 5000
Original file line number Diff line number Diff line change @@ -17,9 +17,6 @@ services:
17
17
extends :
18
18
file : compose.yaml
19
19
service : db
20
- environment :
21
- POSTGRES_USER : app_user
22
- POSTGRES_PASSWORD : secret
23
20
volumes :
24
21
- db-data:/var/lib/postgresql/data
25
22
volumes :
Original file line number Diff line number Diff line change @@ -24,13 +24,13 @@ services:
24
24
restart : unless-stopped
25
25
image : postgres:16
26
26
environment :
27
- POSTGRES_USER : rails_user
27
+ POSTGRES_USER : postgres
28
28
POSTGRES_PASSWORD : secret
29
29
ports :
30
30
- mode : host
31
31
target : 5432
32
32
healthcheck :
33
- test : ["CMD-SHELL", "pg_isready -U app_user "]
33
+ test : ["CMD-SHELL", "pg_isready -U postgres "]
34
34
interval : 10s
35
35
timeout : 5s
36
36
retries : 5
You can’t perform that action at this time.
0 commit comments