From 1469545429b98e1659ebb5c943e2767f5ab66014 Mon Sep 17 00:00:00 2001 From: CJ_Clippy Date: Tue, 14 Jan 2025 19:29:54 -0800 Subject: [PATCH] dont run migrations automatically --- docker-compose.yml | 22 +++++++++++----------- dockerfiles/bright.dockerfile | 4 +++- services/bright/lib/bright_web/router.ex | 16 +++++++++------- 3 files changed, 23 insertions(+), 19 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 47066af..886573e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -76,17 +76,17 @@ services: - db # volumes: # - ./services/bright/lib:/app/lib - # develop: - # watch: - # - action: sync - # path: ./services/bright/ - # target: /app/ - # - action: sync+restart - # path: ./services/bright/application.ex - # target: /app/lib/bright/application.ex - # - action: sync+restart - # path: ./services/bright/mix.exs - # target: /app/mix.exs + develop: + watch: + - action: sync + path: ./services/bright/ + target: /app/ + - action: sync+restart + path: ./services/bright/application.ex + target: /app/lib/bright/application.ex + - action: sync+restart + path: ./services/bright/mix.exs + target: /app/mix.exs db: image: postgres:15 diff --git a/dockerfiles/bright.dockerfile b/dockerfiles/bright.dockerfile index dcf0564..3228717 100644 --- a/dockerfiles/bright.dockerfile +++ b/dockerfiles/bright.dockerfile @@ -70,7 +70,9 @@ RUN mix release ## dev target FROM builder AS dev -CMD [ "mix", "ecto.setup", "&&", "mix", "phx.server" ] +# RUN mix ecto.setup +RUN echo "balls. that is all." +CMD [ "mix", "phx.server" ] # start a new build stage so that the final image will only contain diff --git a/services/bright/lib/bright_web/router.ex b/services/bright/lib/bright_web/router.ex index 4d54b34..ebea60f 100644 --- a/services/bright/lib/bright_web/router.ex +++ b/services/bright/lib/bright_web/router.ex @@ -51,13 +51,13 @@ defmodule BrightWeb.Router do # get "/vtubers/:id/edit", VtuberController, :edit # end - resources "/vtubers", VtuberController do - get "/vods/new", VodController, :new - get "/vods", VodController, :index - get "/vods/:id", VodController, :show - post "/vods", VodController, :create - get "/vtubers/:id/edit", VtuberController, :edit - end + # resources "/vtubers", VtuberController do + # get "/vods/new", VodController, :new + + # post "/vods", VodController, :create + # get "/vtubers/:id/edit", VtuberController, :edit + # end + get "/tags/new", TagController, :new post "/tags", TagController, :create @@ -86,6 +86,8 @@ defmodule BrightWeb.Router do # get "/vods/:id", VodController, :show resources "/vods", VodController + get "/vods/:id", VodController, :show + get "/vods", VodController, :index get "/tags", TagController, :index