Last active
June 13, 2019 09:20
-
-
Save davidsantiago-bib/6e13e99c2d13a715b1e23689dcc28698 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create resource group named DjangoAppRG | |
$ az group create --name DjangoAppRG --location "West Europe" | |
# Create Azure Database for PostgreSQL server named pgdemoserver | |
$ az postgres server create --resource-group DjangoAppRG --name pgdemoserver --location westeurope --admin-user myadmin --admin-password ThisIs4P4ssw0rd!=1 --sku-name B_Gen5_1 | |
# Allow access to Azure services | |
$ az postgres server firewall-rule create -g DjangoAppRG -s pgdemoserver -n allowall --start-ip-address 0.0.0.0 --end-ip-address 0.0.0.0 | |
# Connect to the DB | |
$ psql --host=pgdemoserver.postgres.database.azure.com --port=5432 --username=myadmin@pgdemoserver --dbname=postgres | |
# Create Django database named djangodb | |
postgres=> CREATE DATABASE myproject; | |
postgres=> \q |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment