Skip to content

Commit

Permalink
Update to Phoenix Framework 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nicbet committed Sep 24, 2021
1 parent b39e387 commit 5fb35ac
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nicbet/phoenix:1.5.12
FROM nicbet/phoenix:1.6.0

RUN apt-get install -y ruby \
&& gem install --no-ri --no-rdoc htmlbeautifier \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM elixir:1.12.2
FROM elixir:1.12.3
MAINTAINER Nicolas Bettenburg <[email protected]>

RUN mix local.hex --force \
&& mix archive.install --force hex phx_new 1.5.12 \
&& mix archive.install --force hex phx_new 1.6.0 \
&& apt-get update \
&& curl -sL https://deb.nodesource.com/setup_12.x | bash \
&& apt-get install -y apt-utils \
Expand Down
31 changes: 27 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ It's so simple: just clone this repository.

You can specify a particular Phoenix version by targeting the corresponding release tag of this repository.

For instance, for a dockerized development environment for Phoenix 1.5.12 you could run:
For instance, for a dockerized development environment for Phoenix 1.6.0 you could run:

```
git clone -b 1.5.12 https://github.com/nicbet/docker-phoenix ~/Projects/hello-phoenix
git clone -b 1.6.0 https://github.com/nicbet/docker-phoenix ~/Projects/hello-phoenix
```

### New with Elixir 1.9: Releases
Expand Down Expand Up @@ -103,13 +103,36 @@ If you copied an existing application, now would be the time to run your databas

### Starting the Application

Starting your application is incredibly easy:
Starting your application is incredibly easy, you can either run:

```
docker-compose up
```

Once up, it will be available under http://localhost:4000
or

```
./mix phx.server
```

Once up, it will be available under http://localhost:4000.

You may need to update `config/dev.exs` and set the endpoint listen address to `0.0.0.0` like so:

```
config :hello_world, HelloWorldWeb.Endpoint,
# Binding to loopback ipv4 address prevents access from other machines.
# Change to `ip: {0, 0, 0, 0}` to allow access from other machines.
http: [ip: {0, 0, 0, 0}, port: 4000],
check_origin: false,
code_reloader: true,
debug_errors: true,
secret_key_base: "rM/QJOrRiW+3WWLw+lHJ8kUFJK/LTrwakSG/ftGYl8jYN0FKqfgS50l2C9BdKMoK",
watchers: [
# Start the esbuild watcher by calling Esbuild.install_and_run(:default, args)
esbuild: {Esbuild, :install_and_run, [:default, ~w(--sourcemap=inline --watch)]}
]
```

## Notes

Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
docker build -t nicbet/phoenix:1.5.12 .
docker build -t nicbet/phoenix:1.6.0 .
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version: "2"
services:
app:
image: nicbet/phoenix:1.5.12
image: nicbet/phoenix:1.6.0
build: .
ports:
- "4000:4000"
Expand All @@ -15,7 +15,7 @@ services:
depends_on:
- db
db:
image: postgres:10
image: postgres:12
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
4 changes: 2 additions & 2 deletions run
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash
docker-compose run --rm app $@
docker-compose run --rm app chown -R $(id -u):$(id -g) .
docker-compose run --service-ports --rm app $@
docker-compose run --service-ports --rm app chown -R $(id -u):$(id -g) .

3 comments on commit 5fb35ac

@Largo
Copy link

@Largo Largo commented on 5fb35ac Oct 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heads up: looks like the tag 1.6.0 on dockerhub nicbet/phoenix is not released.

@nicbet
Copy link
Owner Author

@nicbet nicbet commented on 5fb35ac Oct 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me take a look. I believe Docker with their recent updates to Registry and paid accounts may have disabled automated builds for this repo....

@nicbet
Copy link
Owner Author

@nicbet nicbet commented on 5fb35ac Oct 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's published now. Will look into building and publishing releases with GH Actions going forward. Thanks for the heads-up @Largo!

Please sign in to comment.