pentacent / keila

Open Source Newsletter Tool.
https://keila.io
GNU Affero General Public License v3.0
1.26k stars 61 forks source link

Cannot deploy Keila via docker-compose #199

Closed DemianosHB closed 1 year ago

DemianosHB commented 1 year ago

Hi, I'm trying to deploy Keila with your docker-compose and Dockerfile. Unfortunately I'm getting the following error and don't know what I'm doing wrong:

Building keila Step 1/20 : FROM elixir:1.14-alpine as build ---> a89df6b6e0a1 Step 2/20 : ENV MIX_ENV=prod ---> Using cache ---> ba5f62d4935b Step 3/20 : RUN apk add git npm build-base ---> Using cache ---> c175672cfd1f Step 4/20 : COPY mix.exs mix.lock ./ ERROR: Service 'keila' failed to build: COPY failed: file not found in build context or excluded by .dockerignore: stat mix.exs: file does not exist

My docker-compose file looks like this:

version: "3"

services: keila: image: pentacent/keila:latest restart: unless-stopped ports:

  • "63490:4000" depends_on:
  • postgres build: context: ../ dockerfile: ops/Dockerfile environment: SECRET_KEY_BASE: "xxxxxxxxxxxxxxxxxxxxx" DB_URL: "postgres://postgres:postgres@postgres/postgres" URL_HOST: "newsletter.xxxx.de" URL_SCHEMA: "https" URL_PORT: "4000" MAILER_SMTP_HOST: "mail.xxxx.de" MAILER_SMTP_USER: "noreply.xxxx" MAILER_SMTP_PASSWORD: "XXXX" DISABLE_REGISTRATION: "true" USER_CONTENT_DIR: 'keila-data:/var/lib/keila/data'

    postgres: image: postgres:alpine restart: unless-stopped volumes:

  • 'keila-data:/var/lib/postgresql/data' ports:
  • "5432:5432" environment: POSTGRES_PASSWORD: postgres

volumes: keila-data:

wmnnd commented 1 year ago

Is your docker-compose file placed in the ops folder? Because otherwise the context that we have in our default docker-compose file shouldn’t be included.

DemianosHB commented 1 year ago

I think I figured it out. I needed to check out the complete Repo locally. After doing that I could deploy the containers with my docker-compose file located in the ops folder :)

You can close this issue. Thanks for your quick reply!

wmnnd commented 1 year ago

Glad to hear you’ve figured it out! You don’t really have to clone the repo though, you only have to clone it if you want to build your own image. Otherwise you can use the official pentacent/keila image.