Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot deploy Keila via docker-compose #199

Closed
DemianosHB opened this issue Mar 23, 2023 · 3 comments
Closed

Cannot deploy Keila via docker-compose #199

DemianosHB opened this issue Mar 23, 2023 · 3 comments

Comments

@DemianosHB
Copy link

DemianosHB commented Mar 23, 2023

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
Copy link
Contributor

wmnnd commented Mar 23, 2023

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
Copy link
Author

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
Copy link
Contributor

wmnnd commented Mar 23, 2023

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.

@wmnnd wmnnd closed this as completed Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants