Skip to content

Commit

Permalink
Merge c89713b into ffd0de2
Browse files Browse the repository at this point in the history
  • Loading branch information
nertim committed Sep 22, 2018
2 parents ffd0de2 + c89713b commit 9c2aa75
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 60 deletions.
3 changes: 3 additions & 0 deletions client/src/app/shared/models/portal-resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1331,4 +1331,7 @@
public static finishAndDeploy = 'finishAndDeploy';
public static readOnlyLinuxDynamic = 'readOnlyLinuxDynamic';
public static singleContainerPreviewTitle = 'singleContainerPreviewTitle';
public static dockerComposeSample1TitleLinux = 'dockerComposeSample1TitleLinux';
public static dockerComposeSample2TitleLinux = 'dockerComposeSample2TitleLinux';
public static kubernetesSample1TitleLinux = 'kubernetesSample1TitleLinux';
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class ContainerSamplesService implements IContainerSamplesService {
},
{
name: 'sample1',
title: this._ts.instant(PortalResources.quickstartSample1),
title: this._ts.instant(PortalResources.dockerComposeSample1TitleLinux),
configBase64Encoded: this._getDockerComposeSample1Config(),
description: this._ts.instant(PortalResources.dockerComposeSample1Description),
containerType: 'dockerCompose',
Expand All @@ -53,7 +53,7 @@ export class ContainerSamplesService implements IContainerSamplesService {
},
{
name: 'sample2',
title: this._ts.instant(PortalResources.quickstartSample2),
title: this._ts.instant(PortalResources.dockerComposeSample2TitleLinux),
configBase64Encoded: this._getDockerComposeSample2Config(),
description: this._ts.instant(PortalResources.dockerComposeSample2Description),
containerType: 'dockerCompose',
Expand All @@ -62,7 +62,7 @@ export class ContainerSamplesService implements IContainerSamplesService {
},
{
name: 'sample1',
title: this._ts.instant(PortalResources.quickstartSample1),
title: this._ts.instant(PortalResources.kubernetesSample1TitleLinux),
configBase64Encoded: this._getKubernetesComposeSample1Config(),
description: this._ts.instant(PortalResources.kubernetesSample1Description),
containerType: 'kubernetes',
Expand Down Expand Up @@ -91,67 +91,73 @@ export class ContainerSamplesService implements IContainerSamplesService {

private _getDockerComposeSample1Config() {
return btoa(`version: "3"
services:
web:
image: "appsvcsample/asp"
# the source repo is at https://github.com/yiliaomsft/compose-asp-sql
ports:
- "8080:80"
depends_on:
- db
db:
image: "microsoft/mssql-server-linux"
environment:
SA_PASSWORD: "Your_password123"
ACCEPT_EULA: "Y"`);
services:
web:
image: "appsvcsample/asp"
# the source repo is at https://github.com/yiliaomsft/compose-asp-sql
ports:
- "8080:80"
depends_on:
- db
db:
image: "microsoft/mssql-server-linux"
environment:
SA_PASSWORD: "Your_password123"
ACCEPT_EULA: "Y"`);
}

private _getDockerComposeSample2Config() {
return btoa(`version: '3.1'
services:
wp-fpm:
image: appsvcorg/wordpress-multi-container:0.1-fpm
restart: always
depends_on:
- redis
volumes:
- \${WEBAPP_STORAGE_HOME}/site/wwwroot:/var/www/html
- \${WEBAPP_STORAGE_HOME}/LogFiles/php:/var/log/php
ports:
- 2222:2222
environment:
# use local redis
WP_REDIS_HOST: redis
# SSL ENABLE SQL
MYSQL_SSL_CA_PATH: '/'
redis:
image: redis:3-alpine
restart: always
nginx:
image: appsvcorg/nginx-multi-container:0.1-wordpress-fpm
restart: always
depends_on:
- wp-fpm
ports:
- 80:80
volumes:
- \${WEBAPP_STORAGE_HOME}/site/wwwroot:/var/www/html
- \${WEBAPP_STORAGE_HOME}/LogFiles/nginx:/var/log/nginx`);
return btoa(`# If the site can"t start, please set WEBSITES_ENABLE_APP_SERVICE_STORAGE=true in App settings
version: "3.1"
services:
wp-fpm:
image: appsvcorg/wordpress-multi-container:0.1-fpm
restart: always
depends_on:
- redis
volumes:
- \${WEBAPP_STORAGE_HOME}/site/wwwroot:/var/www/html
- \${WEBAPP_STORAGE_HOME}/LogFiles/php:/var/log/php
ports:
- 2222:2222
environment:
# use local redis
WP_REDIS_HOST: redis
# SSL ENABLE SQL
MYSQL_SSL_CA_PATH: "/"
redis:
image: redis:3-alpine
restart: always
nginx:
image: appsvcorg/nginx-multi-container:0.1-wordpress-fpm
restart: always
depends_on:
- wp-fpm
ports:
- 80:80
volumes:
- \${WEBAPP_STORAGE_HOME}/site/wwwroot:/var/www/html
- \${WEBAPP_STORAGE_HOME}/LogFiles/nginx:/var/log/nginx`);
}

private _getKubernetesComposeSample1Config() {
return btoa(`apiVersion: v1
kind: Pod
metadata:
name: wordpress
spec:
containers:
- name: wordpress
image: microsoft/multicontainerwordpress
ports:
- containerPort: 80
- name: redis
image: redis:alpine`);
return btoa(`# You can find details on https://go.microsoft.com/fwlink/?linkid=2024468
apiVersion: v1
kind: Pod
metadata:
name: wordpress
spec:
containers:
- name: wordpress
image: microsoft/multicontainerwordpress
ports:
- containerPort: 80
- name: redis
image: redis:alpine`);
}

private _getWindowsSingleContainerSample1Config() {
Expand Down
13 changes: 11 additions & 2 deletions server/Resources/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -3932,10 +3932,10 @@ Set to "External URL" to use an API definition that is hosted elsewhere.</value>
<value>Docker Compose sample using ASP.NET Core with SQL Server.</value>
</data>
<data name="dockerComposeSample2Description" xml:space="preserve">
<value>WordPress on Multi-container sample app, Docker Compose config.</value>
<value>Docker Compose sample using WordPress and MySQL.</value>
</data>
<data name="kubernetesSample1Description" xml:space="preserve">
<value>WordPress on Multi-container sample app, Kubernetes config.</value>
<value>Kubernetes sample using WordPress and MySQL.</value>
</data>
<data name="quickstartSelectSample" xml:space="preserve">
<value>Select sample</value>
Expand Down Expand Up @@ -4135,4 +4135,13 @@ Set to "External URL" to use an API definition that is hosted elsewhere.</value>
<data name="singleContainerPreviewTitle" xml:space="preserve">
<value>Single Container (Preview)</value>
</data>
<data name="dockerComposeSample1TitleLinux" xml:space="preserve">
<value>ASP.NET Core with SQL Server</value>
</data>
<data name="dockerComposeSample2TitleLinux" xml:space="preserve">
<value>Multi-container WordPress</value>
</data>
<data name="kubernetesSample1TitleLinux" xml:space="preserve">
<value>Multi-container WordPress</value>
</data>
</root>

0 comments on commit 9c2aa75

Please sign in to comment.