[Dev] Reduce config file clutter (#290)
* Added local tooling config files to the tooling/ directory * Moved as many docker-related files as possible * Updated dockerfile path * Updated the correct dockerfile instead how about * Off day - jeez louise * Juggled around some more dockerfiles * more dockerfile * More docker tests * it's docker time * One more shot
This commit is contained in:
parent
132f8e8da6
commit
781061b483
15 changed files with 13 additions and 16 deletions
2
.github/workflows/docker_release.yml
vendored
2
.github/workflows/docker_release.yml
vendored
|
|
@ -75,7 +75,7 @@ jobs:
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./selfhosted.Dockerfile
|
file: ./docker/selfhosted.Dockerfile
|
||||||
# If the event is a release, use the release_arch, otherwise use the
|
# If the event is a release, use the release_arch, otherwise use the
|
||||||
# platforms input if present, falling back to dev_arch
|
# platforms input if present, falling back to dev_arch
|
||||||
platforms: ${{ github.event_name == 'release' && env.release_arch || (github.event.inputs.platforms || env.dev_arch) }}
|
platforms: ${{ github.event_name == 'release' && env.release_arch || (github.event.inputs.platforms || env.dev_arch) }}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
assets/vendor/
|
|
||||||
deps/
|
|
||||||
_build/
|
|
||||||
|
|
@ -108,7 +108,7 @@ services:
|
||||||
2. Prepare the docker image in one of the two ways below:
|
2. Prepare the docker image in one of the two ways below:
|
||||||
- **From GHCR:** `docker pull ghcr.io/kieraneglin/pinchflat:latest`
|
- **From GHCR:** `docker pull ghcr.io/kieraneglin/pinchflat:latest`
|
||||||
- NOTE: also available on Docker Hub at `keglin/pinchflat:latest`
|
- NOTE: also available on Docker Hub at `keglin/pinchflat:latest`
|
||||||
- **Building locally:** `docker build . --file selfhosted.Dockerfile -t ghcr.io/kieraneglin/pinchflat:latest`
|
- **Building locally:** `docker build . --file docker/selfhosted.Dockerfile -t ghcr.io/kieraneglin/pinchflat:latest`
|
||||||
3. Run the container:
|
3. Run the container:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
version: '3'
|
|
||||||
services:
|
services:
|
||||||
phx:
|
phx:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: dev.Dockerfile
|
dockerfile: ./docker/dev.Dockerfile
|
||||||
environment:
|
environment:
|
||||||
- MIX_ENV=test
|
- MIX_ENV=test
|
||||||
volumes:
|
volumes:
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,13 @@
|
||||||
version: '3'
|
|
||||||
services:
|
services:
|
||||||
phx:
|
phx:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: dev.Dockerfile
|
dockerfile: ./docker/dev.Dockerfile
|
||||||
volumes:
|
volumes:
|
||||||
- '.:/app'
|
- '.:/app'
|
||||||
ports:
|
ports:
|
||||||
- '4008:4008'
|
- '4008:4008'
|
||||||
command:
|
command: bash -c "chmod +x docker/docker-run.dev.sh && docker/docker-run.dev.sh"
|
||||||
- ./docker-run.dev.sh
|
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
tty: true
|
tty: true
|
||||||
env_file:
|
env_file:
|
||||||
|
|
|
||||||
|
|
@ -53,9 +53,6 @@ ENV LC_ALL en_US.UTF-8
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . ./
|
COPY . ./
|
||||||
|
|
||||||
# Needs permissions to be updated AFTER the copy step
|
|
||||||
RUN chmod +x ./docker-run.dev.sh
|
|
||||||
|
|
||||||
# Install Elixir deps
|
# Install Elixir deps
|
||||||
# RUN mix archive.install github hexpm/hex branch latest
|
# RUN mix archive.install github hexpm/hex branch latest
|
||||||
RUN mix deps.get
|
RUN mix deps.get
|
||||||
3
mix.exs
3
mix.exs
|
|
@ -87,6 +87,9 @@ defmodule Pinchflat.MixProject do
|
||||||
# See the documentation for `Mix` for more info on aliases.
|
# See the documentation for `Mix` for more info on aliases.
|
||||||
defp aliases do
|
defp aliases do
|
||||||
[
|
[
|
||||||
|
format: "format --dot-formatter=tooling/.formatter.exs",
|
||||||
|
check: "check --config=tooling/.check.exs",
|
||||||
|
credo: "credo --config-file=tooling/.credo.exs",
|
||||||
setup: ["deps.get", "ecto.setup", "assets.setup", "assets.build"],
|
setup: ["deps.get", "ecto.setup", "assets.setup", "assets.build"],
|
||||||
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
|
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
|
||||||
"ecto.reset": ["ecto.drop", "ecto.setup"],
|
"ecto.reset": ["ecto.drop", "ecto.setup"],
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,9 @@
|
||||||
"sqleton": "^2.2.0"
|
"sqleton": "^2.2.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"create-erd": "sqleton -o priv/repo/erd.png priv/repo/pinchflat_dev.db"
|
"create-erd": "sqleton -o priv/repo/erd.png priv/repo/pinchflat_dev.db",
|
||||||
|
"lint:check": "prettier . --check --config=tooling/.prettierrc.js --ignore-path=tooling/.prettierignore --ignore-path=.gitignore",
|
||||||
|
"lint:fix": "prettier . --write --config=tooling/.prettierrc.js --ignore-path=tooling/.prettierignore --ignore-path=.gitignore"
|
||||||
},
|
},
|
||||||
"private": true
|
"private": true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
{:compiler, env: %{"MIX_ENV" => "test"}},
|
{:compiler, env: %{"MIX_ENV" => "test"}},
|
||||||
{:formatter, env: %{"MIX_ENV" => "test"}},
|
{:formatter, env: %{"MIX_ENV" => "test"}},
|
||||||
{:sobelow, "mix sobelow --config"},
|
{:sobelow, "mix sobelow --config"},
|
||||||
{:prettier_formatting, "yarn run prettier . --check", fix: "yarn run prettier . --write"},
|
{:prettier_formatting, "yarn run lint:check", fix: "yarn run lint:fix"},
|
||||||
{:npm_test, false}
|
{:npm_test, false}
|
||||||
|
|
||||||
## curated tools may be disabled (e.g. the check for compilation warnings)
|
## curated tools may be disabled (e.g. the check for compilation warnings)
|
||||||
1
tooling/.prettierignore
Normal file
1
tooling/.prettierignore
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
../assets/vendor/
|
||||||
Loading…
Reference in a new issue