forked from khs1994-docker/lnmp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
50 lines (45 loc) · 1.58 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- "master"
pool:
vmImage: 'windows-2019'
steps:
# - pwsh: |
# get-command docker
# ls $env:ProgramFiles\Docker
# stop-service docker
# choco install docker-desktop | out-null
# & $env:ProgramFiles\Docker\Docker\DockerCli.exe -Start --testftw!928374kasljf039
# ./lnmp-docker wait-docker
# displayName: 'Setting Docker'
- pwsh: |
docker info
docker version
docker-compose --version
./lnmp-docker
cd dockerfile-windows
echo "WIN_VERSION=/servercore:1809" >> .env
docker build --build-arg WIN_VERSION=/servercore:1809 -t khs1994/nginx:1.17.3-windowsservercore-1903 nginx
docker run --isolation=process -it -d -p 8080:80 -p 443:443 khs1994/nginx:1.17.3-windowsservercore-1903
sleep 10
docker ps -a
Invoke-WebRequest 127.0.0.1:8080
docker rm -f $(docker ps -a -q)
docker ps -a
docker-compose config
docker build --build-arg WIN_VERSION=/servercore:1809 -t khs1994/php:7.3.8-windowsservercore-1903 php
cd ..
remove-item windows/config/nginx/www.conf
move-item windows/config/nginx/www.container.config windows/config/nginx/www.conf
docker-compose -f docker-windows.yml up -d nginx php
displayName: 'Up'
- pwsh: |
sleep 20
docker ps -a
Invoke-WebRequest 127.0.0.1:8080
Invoke-WebRequest https://demo.t.khs1994.com/index.html
Invoke-WebRequest https://demo.t.khs1994.com/index.php
displayName: 'Test'