Skip to content

Commit 7bb2638

Browse files
committed
env handling
1 parent 22f0a90 commit 7bb2638

File tree

6 files changed

+8
-6
lines changed

6 files changed

+8
-6
lines changed

.dockerignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
node_modules
22
.cache
33
public/uploads
4-
.env

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM strapi/base:14
22

3-
WORKDIR /my-path
3+
WORKDIR /app
44

55
COPY ./package.json ./
66
COPY ./yarn.lock ./

Dockerfile_dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM strapi/base:14
22

3-
WORKDIR /my-path
3+
WORKDIR /app
44

55
COPY ./package.json ./
66
COPY ./yarn.lock ./

config/database.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = ({ env }) => ({
44
default: {
55
connector: 'bookshelf',
66
settings: {
7-
client: 'postgres',
7+
client: env('DATABASE_CLIENT', 'postgres'),
88
host: env('DATABASE_HOST', 'localhost'),
99
port: env.int('DATABASE_PORT', 5432),
1010
database: env('DATABASE_NAME', 'strapi'),

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ services:
1010
- web
1111
expose:
1212
- 1337
13+
volumes:
14+
- ../.env:/app/.env
1315
networks:
1416
intern:
1517
external: true

docker-compose_dev.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@ version: '3'
22
services:
33
strapi:
44
build:
5-
context: .
5+
context: ./
66
dockerfile: Dockerfile_dev
77
command: yarn develop
8-
env_file: .env
98
external_links:
109
- postgres13master
1110
networks:
1211
- intern
1312
- web
1413
ports:
1514
- '1337:1337'
15+
volumes:
16+
- ../.env:/app/.env
1617
networks:
1718
intern:
1819
external: true

0 commit comments

Comments
 (0)