File tree Expand file tree Collapse file tree 5 files changed +16
-11
lines changed Expand file tree Collapse file tree 5 files changed +16
-11
lines changed Original file line number Diff line number Diff line change 1
1
SECRET_KEY_BASE = example
2
- DATABASE_USERNAME = postgres
3
- DATABASE_PASSWORD = secret
4
- DATABASE_HOST = db
2
+ POSTGRES_USERNAME = postgres
3
+ POSTGRES_HOST = db
Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ RUN bundle install && \
26
26
# Copy application code
27
27
COPY . .
28
28
29
+ RUN ls /rails
30
+
29
31
# Entrypoint prepares the database.
30
32
ENTRYPOINT ["/rails/bin/docker-entrypoint"]
31
33
Original file line number Diff line number Diff line change 1
1
default : &default
2
2
adapter : postgresql
3
3
pool : <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
4
- username : <%= ENV["DATABASE_USERNAME "] %>
5
- password : <%= ENV["DATABASE_PASSWORD "] %>
6
- host : <%= ENV["DATABASE_HOST "] %>
4
+ username : <%= ENV["POSTGRES_USERNAME "] %>
5
+ password : <%= ENV["POSTGRES_PASSWORD "] %>
6
+ host : <%= ENV["POSTGRES_HOST "] %>
7
7
port : 5432
8
8
timeout : 5000
9
9
Original file line number Diff line number Diff line change 1
1
services :
2
- web :
2
+ rails :
3
3
extends :
4
4
file : compose.yaml
5
- service : web
5
+ service : rails
6
6
build :
7
7
context : ./app
8
8
dockerfile : Dockerfile.dev
9
9
env_file :
10
10
- .env
11
+ environment :
12
+ - POSTGRES_PASSWORD=secret
11
13
ports :
12
14
- " 3000:3000"
13
15
volumes :
14
- - .:/rails/
16
+ - ./app :/rails/
15
17
16
18
db :
17
19
extends :
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ services:
8
8
dockerfile : Dockerfile
9
9
env_file :
10
10
- .env
11
+ environment :
12
+ POSTGRES_PASSWORD :
11
13
ports :
12
14
- mode : ingress
13
15
target : 3000
@@ -23,9 +25,9 @@ services:
23
25
db :
24
26
restart : unless-stopped
25
27
image : postgres:16
28
+ x-defang-postgres : true
26
29
environment :
27
- POSTGRES_USER : postgres
28
- POSTGRES_PASSWORD : secret
30
+ POSTGRES_PASSWORD :
29
31
ports :
30
32
- mode : host
31
33
target : 5432
You can’t perform that action at this time.
0 commit comments