mirror of
https://github.com/kieraneglin/pinchflat.git
synced 2026-01-23 02:24:24 +00:00
[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
|
||||
with:
|
||||
context: .
|
||||
file: ./selfhosted.Dockerfile
|
||||
file: ./docker/selfhosted.Dockerfile
|
||||
# If the event is a release, use the release_arch, otherwise use the
|
||||
# platforms input if present, falling back to 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:
|
||||
- **From GHCR:** `docker pull ghcr.io/kieraneglin/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:
|
||||
|
||||
```bash
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
version: '3'
|
||||
services:
|
||||
phx:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: dev.Dockerfile
|
||||
dockerfile: ./docker/dev.Dockerfile
|
||||
environment:
|
||||
- MIX_ENV=test
|
||||
volumes:
|
||||
|
|
|
|||
|
|
@ -1,15 +1,13 @@
|
|||
version: '3'
|
||||
services:
|
||||
phx:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: dev.Dockerfile
|
||||
dockerfile: ./docker/dev.Dockerfile
|
||||
volumes:
|
||||
- '.:/app'
|
||||
ports:
|
||||
- '4008:4008'
|
||||
command:
|
||||
- ./docker-run.dev.sh
|
||||
command: bash -c "chmod +x docker/docker-run.dev.sh && docker/docker-run.dev.sh"
|
||||
stdin_open: true
|
||||
tty: true
|
||||
env_file:
|
||||
|
|
|
|||
|
|
@ -53,9 +53,6 @@ ENV LC_ALL en_US.UTF-8
|
|||
WORKDIR /app
|
||||
COPY . ./
|
||||
|
||||
# Needs permissions to be updated AFTER the copy step
|
||||
RUN chmod +x ./docker-run.dev.sh
|
||||
|
||||
# Install Elixir deps
|
||||
# RUN mix archive.install github hexpm/hex branch latest
|
||||
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.
|
||||
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"],
|
||||
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
|
||||
"ecto.reset": ["ecto.drop", "ecto.setup"],
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@
|
|||
"sqleton": "^2.2.0"
|
||||
},
|
||||
"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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
{:compiler, env: %{"MIX_ENV" => "test"}},
|
||||
{:formatter, env: %{"MIX_ENV" => "test"}},
|
||||
{: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}
|
||||
|
||||
## 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…
Add table
Add a link
Reference in a new issue