Skip to content

Instantly share code, notes, and snippets.

View thiennn's full-sized avatar

Thien Nguyen Le Quynh thiennn

View GitHub Profile
thiennn / .editorConfig
Created July 12, 2023 06:38 — forked from RealDotNetDave/.editorConfig
.editorConfig by David (dotNetDave) McCarter -
# dotNetDave's (David McCarter) Editor Config -
# Updates to this file are posted quarterly at:
# Updated May 2023
# dotNetDave's books available at:
# Rockin' the Code World with dotNetDave (weekly live show):
root = true
# All Files
"AWSEBDockerrunVersion": "1",
"Image": {
"Name": "simplcommerce/simplcommerce-eb",
"Update": "true"
"Ports": [
"ContainerPort": "80"
set -e
if psql -h simpldb --username postgres -lqt | cut -d \| -f 1 | grep -qw simplcommerce; then
echo "simplcommerce database existed"
echo "create new database simplcommerce"
psql -h simpldb --username postgres -c "CREATE DATABASE simplcommerce WITH ENCODING 'UTF8'"
psql -h simpldb --username postgres -d simplcommerce -a -f /app/dbscript.sql
psql -h simpldb --username postgres -d simplcommerce -a -f /app/StaticData_Postgres.sql
FROM simplcommerce/simpl-sdk AS build-env
COPY . ./
RUN sed -i 's#<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.0.0-preview2-final" />#<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="2.0.0-preview2-final" />#' src/SimplCommerce.WebHost/SimplCommerce.WebHost.csproj
RUN sed -i 's/UseSqlServer/UseNpgsql/' src/SimplCommerce.WebHost/Program.cs
RUN sed -i 's/UseSqlServer/UseNpgsql/' src/SimplCommerce.WebHost/Extensions/ServiceCollectionExtensions.cs
RUN rm src/SimplCommerce.WebHost/Migrations/* && cp -f src/SimplCommerce.WebHost/appsettings.docker.json src/SimplCommerce.WebHost/appsettings.json
thiennn /
Last active January 4, 2017 02:32
a shell script for simplcommerce-first-Dockerfile
set -e
cd /app/src/SimplCommerce.WebHost && dotnet ef database update
psql --username postgres -d simplcommerce -a -f /app/src/Database/StaticData_Postgres.sql
cd /app/src/SimplCommerce.WebHost && dotnet run
thiennn / Dockerfile
Created December 1, 2016 06:58
FROM postgres:9.5
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
wget \
libc6 \
libcurl3 \
libgcc1 \