You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can echo each of these but only the defaults are used for my migrations
Am I doing something silly?
oh, and if comment out soda migrate in the docker file and shell into the container the migrations work ???
but docker compose uses the default host of localhost and not db
the log shows: #29 0.625 [POP] 2021/09/30 18:07:33 info - 0.0010 seconds #29 0.625 Error: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=localhost user=movie_user database=movie_database: dial error (dial tcp [::1]:5432: connect: cannot assign requested address)
#29 0.625 [POP] 2021/09/30 18:07:33 warn - Migrator: unable to dump schema: exec: "pg_dump": executable file not found in $PATH
it shows localhost instead of the db I expect...pretty new to all this so it may not be a bug;
this is my docker file
syntax=docker/dockerfile:1
FROM golang:1.16.8-alpine3.14
RUN addgroup app && adduser -S -G app app
WORKDIR /app/home
#RUN npm install
COPY . .
RUN go get github.com/gobuffalo/pop/...
EXPOSE 4000
RUN soda migrate
CMD go build -o movies cmd/api/*.go && ./movies
For bug reports, please provide as much relevant info as possible.
Steps to Reproduce the Problem
Please describe in painful detail what you did (so others can play along with you) to get to this point. This includes things like the exact command(s) you used, or the curl command you used, that sort of thing.
spin up a container with go and alpine
install soda
run migration as a RUN
Expected Behavior
What did you what to happen? Tell us a story. We love to read.
that it would use the env vars referred to in the go template and set by the env file
Actual Behavior
In the happiest of happy places what should have happened?
Info
wsl2 Linux soda v5.3.1
Please precise your OS, the Pop version and if you're using Pop through Buffalo.
The text was updated successfully, but these errors were encountered:
Description
[NEVER MIND FIXED WITH A WAIT SCRIPT]
I have docker environment variables that I have confirmed on the container.
I am using this in my database.yml file
development:
dialect: postgres
database: {{ envOr "POSTGRES_DB" "movie_database" }}
user: {{ envOr "POSTGRES_USER" "movie_user" }}
password: {{ envOr "POSTGRES_PASSWORD" "magic_ticket" }}
host: {{ envOr "POSTGRES_HOST" "localhost" }}
pool: 5
should I be able to use the detailed setup with envOr?
it is able to pull out the default values when I run locally without a docker container,
this is my .env
database.env
POSTGRES_USER=movie_user
POSTGRES_PASSWORD=magic_ticket
POSTGRES_DB=movie_database
POSTGRES_PORT=6543
POSTGRES_HOST=db
I can echo each of these but only the defaults are used for my migrations
Am I doing something silly?
oh, and if comment out soda migrate in the docker file and shell into the container the migrations work ???
but docker compose uses the default host of localhost and not db
the log shows:
#29 0.625 [POP] 2021/09/30 18:07:33 info - 0.0010 seconds
#29 0.625 Error: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to
host=localhost user=movie_user database=movie_database
: dial error (dial tcp [::1]:5432: connect: cannot assign requested address)#29 0.625 [POP] 2021/09/30 18:07:33 warn - Migrator: unable to dump schema: exec: "pg_dump": executable file not found in $PATH
it shows localhost instead of the db I expect...pretty new to all this so it may not be a bug;
this is my docker file
syntax=docker/dockerfile:1
FROM golang:1.16.8-alpine3.14
RUN addgroup app && adduser -S -G app app
WORKDIR /app/home
#RUN npm install
COPY . .
RUN go get github.com/gobuffalo/pop/...
EXPOSE 4000
RUN soda migrate
CMD go build -o movies cmd/api/*.go && ./movies
For bug reports, please provide as much relevant info as possible.
Steps to Reproduce the Problem
Please describe in painful detail what you did (so others can play along with you) to get to this point. This includes things like the exact command(s) you used, or the
curl
command you used, that sort of thing.Expected Behavior
What did you what to happen? Tell us a story. We love to read.
that it would use the env vars referred to in the go template and set by the env file
Actual Behavior
In the happiest of happy places what should have happened?
Info
wsl2 Linux soda v5.3.1
Please precise your OS, the Pop version and if you're using Pop through Buffalo.
The text was updated successfully, but these errors were encountered: