-
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(docker): set up docker-compose toolchain
- config: move DATABASE_URL to runtime env var
- Loading branch information
Showing
9 changed files
with
64 additions
and
30 deletions.
There are no files selected for viewing
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,3 @@ | ||
./bullion/_build | ||
./bullion/deps | ||
./bullion/deps | ||
./bullion/assets/node_modules |
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 +1,2 @@ | ||
.env | ||
.idea |
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
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
version: "3" | ||
|
||
services: | ||
web: | ||
build: | ||
context: . | ||
args: | ||
mix_env: prod | ||
secret_key: ${SECRET_KEY} | ||
deps_postfix: "--only prod" | ||
image: "bullion:0.1.0" | ||
ports: | ||
- "4000:4000" | ||
environment: | ||
- PORT=4001 | ||
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db/${POSTGRES_DB} | ||
db: | ||
container_name: "bullion-db" | ||
environment: | ||
- POSTGRES_USER=${POSTGRES_USER} | ||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD} | ||
- POSTGRES_DB=${POSTGRES_DB} | ||
volumes: | ||
- bullion-db:/var/lib/postgresql/data | ||
expose: | ||
- "5432" | ||
volumes: | ||
bullion-db: | ||
driver: local |
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,16 +1,23 @@ | ||
version: "3" | ||
|
||
services: | ||
# Create a service named db. | ||
web: | ||
build: | ||
context: . | ||
args: | ||
mix_env: dev | ||
image: "bullion:0.1.0.dev" | ||
ports: | ||
- "4000:4000" | ||
environment: | ||
- PORT=4001 | ||
- DATABASE_URL=postgresql://postgres:postgres@db/bullion | ||
db: | ||
# Use the Docker Image postgres. This will pull the newest release. | ||
image: "postgres" | ||
# Give the container the name my_postgres. You can changes to something else. | ||
image: "postgres:12" | ||
container_name: "bullion-db" | ||
# Setup the username, password, and database name. You can changes these values. | ||
environment: | ||
- POSTGRES_USER=postgres | ||
- POSTGRES_PASSWORD=postgres | ||
- POSTGRES_DB=bullion | ||
# Maps port 54320 (localhost) to port 5432 on the container. You can change the ports to fix your needs. | ||
ports: | ||
- "54320:5432" | ||
expose: | ||
- "5432" |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
docker-compose.yaml | ||
docker-compose.prod.yaml | ||
.env |