This file contains hidden or 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
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>My Todo App</title> | |
| <base href="/"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <link rel="icon" type="image/x-icon" href="favicon.ico"> | |
| <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> |
This file contains hidden or 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
| CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
| bc2fa58431d6 gcr.io/yourproject/version1 "uwsgi --http :8080 …" 6 days ago Up 6 days klt-todo-vm-tsgu |
This file contains hidden or 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
| [...] | |
| DATABASES = { | |
| 'default': { | |
| 'ENGINE': 'django.db.backends.postgresql', | |
| 'NAME': os.environ['DB_NAME_DJANGO'], | |
| 'USER': os.environ['DB_USER_DJANGO'], | |
| 'PASSWORD': os.environ['DB_PASSWORD_DJANGO'], | |
| 'HOST': os.environ['CLOUD_SQL_INSTANCE_IP'], | |
| 'PORT': 5432, | |
| } |
This file contains hidden or 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
| steps: | |
| # Decrypt the file containing the access key. | |
| - name: 'gcr.io/cloud-builders/gcloud' | |
| args: | |
| - kms | |
| - decrypt | |
| - --ciphertext-file=version1key.enc | |
| - --plaintext-file=/root/.ssh/id_rsa | |
| - --location=global | |
| - --keyring=version1-keyring |
This file contains hidden or 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
| steps: | |
| # Clone the repository. | |
| - name: 'gcr.io/cloud-builders/git' | |
| args: | |
| - clone | |
| - '--depth' | |
| - '1' | |
| - https://github.com/dnstanciu/drf-angular-docker-tutorial.git | |
| # Build and tag the image. |
This file contains hidden or 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
| [...] | |
| # Copy app files. | |
| COPY . /app | |
| # Default build configuration. | |
| ARG configuration=production | |
| # Build app | |
| RUN npm run build --prefix angular-app -- --output-path=./dist/out --configuration $configuration |
This file contains hidden or 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
| EXPOSE 8080 | |
| CMD ["uwsgi", "--http", ":8080", "--ini", "./uwsgi/uwsgi.ini"] |
This file contains hidden or 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
| [...] | |
| class Task(models.Model): | |
| """Stores a task.""" | |
| created_by = models.CharField(max_length=200) | |
| title = models.CharField(max_length=50) | |
| [...] |
This file contains hidden or 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
| import { Injectable } from '@angular/core'; | |
| import { HttpClient, HttpHeaders } from '@angular/common/http'; | |
| import { Observable } from 'rxjs'; | |
| import { Task } from './task'; | |
| import { AuthService } from './auth/auth.service'; | |
| @Injectable({ | |
| providedIn: 'root' | |
| }) |
This file contains hidden or 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
| from django.db import migrations | |
| from django.conf import settings | |
| def create_data(apps, schema_editor): | |
| User = apps.get_model(settings.AUTH_USER_MODEL) | |
| user = User(pk=1, username="auth0user", is_active=True , email="myemail@someprovider.com") | |
| user.save() | |
| class Migration(migrations.Migration): |
NewerOlder