File tree Expand file tree Collapse file tree 3 files changed +5
-15
lines changed Expand file tree Collapse file tree 3 files changed +5
-15
lines changed Original file line number Diff line number Diff line change 1
- DATABASE_URL=postgres://postgres@database_default:5432/db
1
+ DATABASE_URL=postgres://postgres:password @database_default:5432/db
2
2
DEFAULT_STORAGE_DSN=file:///data/media/?url=%2Fmedia%2F
3
3
DJANGO_DEBUG=True
4
4
DOMAIN_ALIASES=localhost, 127.0.0.1
Original file line number Diff line number Diff line change @@ -20,8 +20,11 @@ services:
20
20
database_default :
21
21
# Select one of the following db configurations for the database
22
22
image : postgres:9.6-alpine
23
+ ports :
24
+ - " 5432:5432" # allow your local dev env to connect to the db
23
25
environment :
24
26
POSTGRES_DB : " db"
27
+ POSTGRES_PASSWORD : " password"
25
28
POSTGRES_HOST_AUTH_METHOD : " trust"
26
29
SERVICE_MANAGER : " fsm-postgres"
27
30
volumes :
Original file line number Diff line number Diff line change 141
141
# Configure database using DATABASE_URL; fall back to sqlite in memory when no
142
142
# environment variable is available, e.g. during Docker build
143
143
DATABASE_URL = os .environ .get ('DATABASE_URL' , 'sqlite://:memory:' )
144
-
145
- if not os .environ .get ('CI' , False ):
146
- DATABASES = {'default' : dj_database_url .parse (DATABASE_URL )}
147
- else :
148
- DATABASES = {
149
- 'default' : {
150
- 'ENGINE' : 'django.db.backends.postgresql' ,
151
- 'NAME' : 'postgres' ,
152
- 'USER' : 'postgres' ,
153
- 'PASSWORD' : 'postgres' ,
154
- 'HOST' : '127.0.0.1' ,
155
- 'PORT' : '5432' ,
156
- }
157
- }
144
+ DATABASES = {'default' : dj_database_url .parse (DATABASE_URL )}
158
145
159
146
160
147
# Password validation
You can’t perform that action at this time.
0 commit comments