Updated build tools to remove postgres
This commit is contained in:
parent
80689517a1
commit
5a46a6accd
9 changed files with 3 additions and 36 deletions
|
|
@ -1,3 +0,0 @@
|
||||||
POSTGRES_HOST=postgres
|
|
||||||
POSTGRES_USER=postgres
|
|
||||||
POSTGRES_PASSWORD=postgres
|
|
||||||
3
.github/workflows/lint_and_test.yml
vendored
3
.github/workflows/lint_and_test.yml
vendored
|
|
@ -24,9 +24,6 @@ jobs:
|
||||||
- name: Create and populate ENV file
|
- name: Create and populate ENV file
|
||||||
run: |
|
run: |
|
||||||
echo MIX_ENV=test >> .env
|
echo MIX_ENV=test >> .env
|
||||||
echo POSTGRES_HOST=postgres >> .env
|
|
||||||
echo POSTGRES_USER=postgres >> .env
|
|
||||||
echo POSTGRES_PASSWORD=postgres >> .env
|
|
||||||
|
|
||||||
- name: Pull prebuilt images
|
- name: Pull prebuilt images
|
||||||
run: docker compose pull
|
run: docker compose pull
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ FROM elixir:latest
|
||||||
|
|
||||||
# Install debian packages
|
# Install debian packages
|
||||||
RUN apt-get update -qq
|
RUN apt-get update -qq
|
||||||
RUN apt-get install -y inotify-tools postgresql-client ffmpeg \
|
RUN apt-get install -y inotify-tools ffmpeg \
|
||||||
python3 python3-pip python3-setuptools python3-wheel python3-dev
|
python3 python3-pip python3-setuptools python3-wheel python3-dev
|
||||||
|
|
||||||
# Install nodejs
|
# Install nodejs
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ config :pinchflat,
|
||||||
|
|
||||||
# Configure your database
|
# Configure your database
|
||||||
config :pinchflat, Pinchflat.Repo,
|
config :pinchflat, Pinchflat.Repo,
|
||||||
database: Path.expand("../pinchflat_dev.db", Path.dirname(__ENV__.file)),
|
database: Path.expand("../priv/repo/pinchflat_dev.db", Path.dirname(__ENV__.file)),
|
||||||
show_sensitive_data_on_connection_error: true,
|
show_sensitive_data_on_connection_error: true,
|
||||||
pool_size: 5
|
pool_size: 5
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ config :pinchflat, Oban, testing: :manual
|
||||||
# to provide built-in test partitioning in CI environment.
|
# to provide built-in test partitioning in CI environment.
|
||||||
# Run `mix help test` for more information.
|
# Run `mix help test` for more information.
|
||||||
config :pinchflat, Pinchflat.Repo,
|
config :pinchflat, Pinchflat.Repo,
|
||||||
database: Path.expand("../pinchflat_test.db", Path.dirname(__ENV__.file)),
|
database: Path.expand("../priv/repo/pinchflat_test.db", Path.dirname(__ENV__.file)),
|
||||||
pool_size: 5,
|
pool_size: 5,
|
||||||
pool: Ecto.Adapters.SQL.Sandbox
|
pool: Ecto.Adapters.SQL.Sandbox
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,5 @@
|
||||||
version: '3'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
postgres:
|
|
||||||
image: 'postgres:16-alpine'
|
|
||||||
environment:
|
|
||||||
POSTGRES_USER: postgres
|
|
||||||
POSTGRES_PASSWORD: postgres
|
|
||||||
|
|
||||||
phx:
|
phx:
|
||||||
build: .
|
build: .
|
||||||
volumes:
|
volumes:
|
||||||
|
|
@ -13,4 +7,3 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- '4008:4008'
|
- '4008:4008'
|
||||||
command: tail -F /dev/null
|
command: tail -F /dev/null
|
||||||
env_file: .env
|
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,12 @@
|
||||||
version: '3'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
postgres:
|
|
||||||
image: 'postgres:16-alpine'
|
|
||||||
environment:
|
|
||||||
POSTGRES_USER: postgres
|
|
||||||
POSTGRES_PASSWORD: postgres
|
|
||||||
|
|
||||||
phx:
|
phx:
|
||||||
build: .
|
build: .
|
||||||
volumes:
|
volumes:
|
||||||
- '.:/app'
|
- '.:/app'
|
||||||
ports:
|
ports:
|
||||||
- '4008:4008'
|
- '4008:4008'
|
||||||
depends_on:
|
|
||||||
- postgres
|
|
||||||
command:
|
command:
|
||||||
- ./docker-run.sh
|
- ./docker-run.sh
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
tty: true
|
tty: true
|
||||||
env_file:
|
|
||||||
- .env
|
|
||||||
|
|
|
||||||
|
|
@ -10,15 +10,6 @@ echo "\nInstalling JS..."
|
||||||
cd assets && yarn install
|
cd assets && yarn install
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# Wait for Postgres to become available.
|
|
||||||
export PGPASSWORD=$(echo $POSTGRES_PASSWORD)
|
|
||||||
until psql -h postgres -U $POSTGRES_USER -c '\q' 2>/dev/null; do
|
|
||||||
echo >&2 "Postgres is unavailable - sleeping"
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "\nPostgres is available: continuing with database setup..."
|
|
||||||
|
|
||||||
# Potentially Set up the database
|
# Potentially Set up the database
|
||||||
mix ecto.create
|
mix ecto.create
|
||||||
mix ecto.migrate
|
mix ecto.migrate
|
||||||
|
|
|
||||||
1
mix.exs
1
mix.exs
|
|
@ -36,7 +36,6 @@ defmodule Pinchflat.MixProject do
|
||||||
{:phoenix_ecto, "~> 4.4"},
|
{:phoenix_ecto, "~> 4.4"},
|
||||||
{:ecto_sql, "~> 3.10"},
|
{:ecto_sql, "~> 3.10"},
|
||||||
{:ecto_sqlite3, ">= 0.0.0"},
|
{:ecto_sqlite3, ">= 0.0.0"},
|
||||||
{:postgrex, ">= 0.0.0"},
|
|
||||||
{:phoenix_html, "~> 3.3"},
|
{:phoenix_html, "~> 3.3"},
|
||||||
{:phoenix_live_reload, "~> 1.2", only: :dev},
|
{:phoenix_live_reload, "~> 1.2", only: :dev},
|
||||||
{:phoenix_live_view, "~> 0.20.1"},
|
{:phoenix_live_view, "~> 0.20.1"},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue