Skip to content

Commit 2d719e8

Browse files
committed
Docker (wip)
1 parent cece90b commit 2d719e8

11 files changed

+25
-37
lines changed

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@
66
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
77

88
# Copy solution and source
9+
ARG SOLUTION=Smartstore.Min.sln
910
WORKDIR /app
10-
COPY *.sln ./
11+
COPY $SOLUTION ./
1112
COPY src/ ./src
1213

1314
# Create Modules dir if missing
1415
RUN mkdir /app/src/Smartstore.Web/Modules -p -v
1516

1617
# Build
17-
RUN dotnet build Smartstore.Min.sln -c Release
18+
RUN dotnet build $SOLUTION -c Release
1819

1920
# Publish
2021
WORKDIR /app/src/Smartstore.Web

build/compose.mysql.cmd

Lines changed: 0 additions & 3 deletions
This file was deleted.

build/compose.mysql.nobuild.cmd

Lines changed: 0 additions & 3 deletions
This file was deleted.

build/compose.mysql.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
cd ..
2+
docker-compose up -d
3+
echo 'Press enter to exit...'; read dummy;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
cd ..
22
docker-compose -f docker-compose.yml -f docker-compose.sqlserver.yml up -d
3-
pause
3+
echo 'Press enter to exit...'; read dummy;

build/dockerize.linux.nobuild.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
cd ..
2-
docker build -t smartstore-linux -f NoBuild.Dockerfile .
2+
docker build -t smartstore -f NoBuild.Dockerfile .
33
echo 'Press enter to exit...'; read dummy;

build/dockerize.linux.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
cd ..
2-
docker build -t smartstore-linux .
2+
docker build -t smartstore .
33
echo 'Press enter to exit...'; read dummy;

build/dockerize.windows.nobuild.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
cd ..
2-
docker build -t smartstore-windows -f Nano.Dockerfile .
2+
docker build -t smartstore -f Nano.Dockerfile .
33
echo 'Press enter to exit...'; read dummy;

docker-compose.nobuild.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

docker-compose.sqlserver.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,22 @@
11
services:
22
web:
3-
build:
4-
context: .
5-
dockerfile: Dockerfile.nobuild
3+
volumes:
4+
- "D:/mount/smtenants/sqlserver:/app/App_Data/Tenants"
65
db:
76
image: "mcr.microsoft.com/mssql/server"
8-
container_name: db
7+
container_name: sqlserver
98
environment:
10-
SA_PASSWORD: "smartstore"
9+
SA_PASSWORD: "Smartstore2022!"
1110
ACCEPT_EULA: "Y"
1211
MSSQL_PID: "Express"
1312
ports:
1413
- '1434:1433'
1514
expose:
1615
- '1433'
1716
volumes:
18-
- mssqlsystem:/var/opt/mssql/
19-
- mssqldata:/var/opt/sqlserver/data
20-
- mssqllog:/var/opt/sqlserver/log
21-
- mssqlbackup:/var/opt/sqlserver/backup
17+
- mssql_system:/var/opt/mssql/
18+
- mssql_user:/var/opt/sqlserver/
2219

2320
volumes:
24-
mssqlsystem:
25-
mssqldata:
26-
mssqllog:
27-
mssqlbackup:
21+
mssql_system:
22+
mssql_user:

docker-compose.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@ version: "3.4"
22
services:
33
web:
44
image: smartstore
5-
container_name: smartstore
5+
container_name: web
66
ports:
77
- "80:80"
88
depends_on:
99
- db
1010
volumes:
11-
- "D:/mount/smtenants:/app/App_Data/Tenants"
11+
- "D:/mount/smtenants/mysql:/app/App_Data/Tenants"
1212
db:
1313
image: mysql
1414
container_name: mysql
1515
environment:
16-
MYSQL_DATABASE: smartstore
16+
#MYSQL_DATABASE: smartstore
1717
#MYSQL_USER: "root"
18-
MYSQL_PASSWORD: "smartstore"
19-
MYSQL_ROOT_PASSWORD: "smartstore"
18+
MYSQL_PASSWORD: "Smartstore2022!"
19+
MYSQL_ROOT_PASSWORD: "Smartstore2022!"
2020
ports:
2121
- '3307:3306'
2222
expose:
2323
- '3306'
2424
volumes:
25-
- smartstore-db:/var/lib/mysql
25+
- mysql:/var/lib/mysql
2626

2727
volumes:
28-
smartstore-db:
28+
mysql:

0 commit comments

Comments
 (0)