Skip to content

Commit db3ec04

Browse files
committed
Use env variables instead of appsettings in docker compose
1 parent dded4ff commit db3ec04

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed
File renamed without changes.

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
# Configuration
77
appsettings.*.json
8+
.env
89

910
# User-specific files
1011
*.rsuser

BenchStoreMVC/compose.yml renamed to compose.yml

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
services:
22
web:
33
build:
4-
dockerfile: ./Dockerfile
4+
dockerfile: ./BenchStoreMVC/Dockerfile
55
container_name: BenchStore-web
6-
ports:
7-
- 15142:80
6+
restart: always
7+
environment:
8+
ConnectionStrings__BenchStoreContext: "Host=BenchStore-db; Database=${POSTGRES_DB}; Username=${POSTGRES_USER}; Password=${POSTGRES_PASSWORD}"
9+
TableGenerator__PythonPath: /usr/bin/python
10+
TableGenerator__TableGeneratorPath: /usr/bin/table-generator
11+
Storage__ResultStoragePath: /app/result-storage
812
volumes:
9-
- ./BenchStoreMVC/appsettings.Production.json:/app/appsettings.Production.json
1013
- result-storage:/app/result-storage
14+
ports:
15+
- 15142:80
1116

1217
database:
1318
image: docker.io/postgres:16-alpine

0 commit comments

Comments
 (0)