-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update database configuration for local and production environ…
…ments
- Loading branch information
1 parent
7712429
commit b81f260
Showing
8 changed files
with
75 additions
and
48 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
application: | ||
host: 127.0.0.1 | ||
database: | ||
require_ssl: false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
application: | ||
host: 0.0.0.0 | ||
database: | ||
require_ssl: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,43 @@ | ||
#! spec.yaml | ||
name: zero2prod | ||
# Check https://www.digitalocean.com/docs/app-platform/#regional-availability | ||
# for a list of all the available options. | ||
# You can get region slugs from | ||
# https://www.digitalocean.com/docs/platform/availability-matrix/ | ||
# They must specified lowercased. | ||
# `fra` stands for Frankfurt (Germany - EU) | ||
region: fra | ||
services: | ||
- name: zero2prod | ||
# Relative to the repository root | ||
dockerfile_path: Dockerfile | ||
source_dir: . | ||
github: | ||
# Depending on when you created the repository, | ||
# the default branch on GitHub might have been named `master` | ||
branch: master | ||
# Deploy a new version on every commit to `main`! | ||
# Continuous Deployment, here we come! | ||
deploy_on_push: true | ||
# !!! Fill in with your details | ||
# e.g. LukeMathWalker/zero-to-production | ||
repo: josemoura212/zero2prod | ||
# Active probe used by DigitalOcean's to ensure our application is healthy | ||
health_check: | ||
# The path to our health check endpoint! | ||
# It turned out to be useful in the end! | ||
http_path: /health_check | ||
# The port the application will be listening on for incoming requests | ||
# It should match what we specified in our configuration/production.yaml file! | ||
http_port: 8000 | ||
# For production workloads we'd go for at least two! | ||
# But let's try to keep the bill under control for now... | ||
instance_count: 1 | ||
instance_size_slug: basic-xxs | ||
# All incoming requests should be routed to our app | ||
routes: | ||
- path: / | ||
envs: | ||
- key: APP_APPLICATION__BASE_URL | ||
scope: RUN_TIME | ||
value: ${APP_URL} | ||
- key: APP_DATABASE__USERNAME | ||
scope: RUN_TIME | ||
value: ${newsletter.USERNAME} | ||
- key: APP_DATABASE__PASSWORD | ||
scope: RUN_TIME | ||
value: ${newsletter.PASSWORD} | ||
- key: APP_DATABASE__HOST | ||
scope: RUN_TIME | ||
value: ${newsletter.HOSTNAME} | ||
- key: APP_DATABASE__PORT | ||
scope: RUN_TIME | ||
value: ${newsletter.PORT} | ||
- key: APP_DATABASE__DATABASE_NAME | ||
scope: RUN_TIME | ||
value: ${newsletter.DATABASE} | ||
|
||
databases: | ||
- engine: PG | ||
name: newsletter | ||
num_nodes: 1 | ||
size: db-s-dev-database | ||
version: "12" |
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
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
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