pavancse17
Hey devs,
I am building a website using phoenix inside a container using vscode from few months. Recently i tried to enable https endpoint using mix phx.gen.cert. But i am getting below warning for every ping. I am not docker or domains expert
. Any idea on how to fix it?
[info] TLS :server: In state :abbreviated received CLIENT ALERT: Fatal - Certificate Unknown
[info] TLS :server: In state :abbreviated received CLIENT ALERT: Fatal - Certificate Unknown
.Dockerfile
FROM elixir:1.11.3
RUN apt-get update \
&& curl -sL https://deb.nodesource.com/setup_12.x | bash \
&& apt-get install -y apt-utils \
&& apt-get install -y nodejs \
&& apt-get install -y build-essential \
&& apt-get install -y inotify-tools \
&& apt-get install -y zsh \
&& apt-get install -y vim \
&& mix local.hex --force \
&& mix local.rebar -- \
&& apt-get install -y ruby \
&& gem install --no-ri --no-rdoc htmlbeautifier \
&& npm i -g npm \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
RUN sh -c "$(curl -sSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
RUN git clone https://github.com/romkatv/powerlevel10k.git ~/.oh-my-zsh/custom/themes/powerlevel10k
---
.docker-compose
version: "3.7"
services:
db:
image: postgres:13.1
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
volumes:
- "database:/var/lib/postgresql/data"
ports:
- 5432:5432
app:
build:
context: ../
dockerfile: .devcontainer/Dockerfile
command: sleep infinity
environment:
MIX_ENV: dev
ports:
- "4001:4001"
volumes:
# Mounts the project folder to '/workspace'. The target path inside the container
# should match should match what your application expects. In this case, the
# compose file is in a sub-folder, so we will mount '..'. We'll then reference this
# as the workspaceFolder in '.devcontainer/devcontainer.json' so VS Code starts here.
- ..:/app:cached
- .zshrc:/root/.zshrc
- .p10k.zsh:/root/.p10k.zsh
# This lets you avoid setting up Git again in the container
- ~/.gitconfig:/root/.gitconfig
depends_on:
- db
volumes:
database:
dev.exs conf file
config :je, JeWeb.Endpoint,
https: [
port: 4001,
cipher_suite: :strong,
certfile: "priv/cert/selfsigned.pem",
keyfile: "priv/cert/selfsigned_key.pem"
],
Trending in Questions
Hello!
Suppose you are building workflow (order / task / payment) processing system with the following requirements:
Each workflow con...
New
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app?
Looking for hints regarding:
Addi...
New
Kia ora,
We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
Hi all, I wanted to ask how the community is dealing with post-release steps.
Today we have Ecto migrations, which make sure that the db...
New
Hello,
I have an Elixir backend that implements a custom protocol over TCP. I want to load test the backend and assess the performance o...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #phoenix_html
- #iex
- #graphql
- #ai
- #genstage
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex










First 10 of 10 Posts
voltone
The server says the client aborted the TLS handshake because it didn’t like the certificate. What client is making those request and how did you tell it that it’s ok to accept a self-signed certificate?
pavancse17
I am just trying to access from browser.
voltone
Browsers don’t just silently accept a self-signed test certificate. Some pop up a message warning you of the risk, and let you proceed if you know what you’re doing. Others abort the connection unless you change some preferences. Some differentiate between regular domains and
localhost.If you tell us which browser you’re using, maybe someone who is familiar with that browser can describe their setup. I doubt that it is related to your Docker or VSCode setup
pavancse17
yes! I got the pop ups and selected proceed. I tried chrome, chrome based edge browser earlier.
— Logs from chromium based browsers
But interestingly, I am not getting any warning when i try to access from Firefox today.
Firefox log
So now I am sure that the issue is with the browser not the docker or vscode setup
.
.
These warnings are not the deal breaker though, since I am able to access server. but I like the logs to be clean
pavancse17
I fixed this issue in chrome, edge browsers by following this solution from stack overflow
ssl - Getting Chrome to accept self-signed localhost certificate - Stack Overflow
dealloc
You might be interested in mkcert, which self describes as
evadne
Can also consider GitHub - sasa1977/site_encrypt: Integrated certification via Let's encrypt for Elixir-powered sites · GitHub
voltone
You mean
chrome://flags/#allow-insecure-localhost? Themix phx.gen.certtask does actually point that out after generating a certificate.pavancse17
I didn’t tried this earlier. but I undid the changes and tried this
chrome://flags/#allow-insecure-localhost. I expected it will work but it didn’t. So I had to stick with previous solution again.pavancse17
seems like good fit for prod. But I am just using https in my local to satisfy some SSO providers like Azure AD, Okta.