Skip to content

Commit b9f3578

Browse files
work on including dockerfile in docker compose
1 parent 9f1b635 commit b9f3578

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

.env

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
DB_USER=postgres
22
DB_PASSWORD=postgres
33
DB_PORT=5432
4-
HASURA_GRAPHQL_ADMIN_SECRET=helloworld
4+
HASURA_GRAPHQL_ADMIN_SECRET=helloworld
5+
6+
DATABASE_URL="ecto://postgres:postgres@db:5432/fileonchain?ssl=false"
7+
SECRET_KEY_BAS=helloworld

config/config.exs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ config :fileonchain,
1414
# Configures the endpoint
1515
config :fileonchain, FileonchainWeb.Endpoint,
1616
url: [host: System.get_env("PHX_HOST") || "localhost"],
17+
check_origin: [System.get_env("PHX_HOST") || "localhost"]
1718
adapter: Bandit.PhoenixAdapter,
1819
render_errors: [
1920
formats: [html: FileonchainWeb.ErrorHTML, json: FileonchainWeb.ErrorJSON],

docker-compose.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,19 @@ services:
2929
- "8080:8080"
3030
command:
3131
- graphql-engine
32-
- serve
32+
- serve
33+
34+
app:
35+
container_name: app
36+
build:
37+
context: .
38+
dockerfile: Dockerfile
39+
environment:
40+
MIX_ENV: prod
41+
DATABASE_URL: ${DATABASE_URL}
42+
SECRET_KEY_BASE: ${SECRET_KEY_BASE}
43+
PHX_HOST: localhost
44+
ports:
45+
- "4000:4000"
46+
depends_on:
47+
- db

0 commit comments

Comments
 (0)