Skip to content

Commit

Permalink
Upgrade Elixir to 1.16. Upgrade Ubuntu to 22.04. Add Circle CI executors
Browse files Browse the repository at this point in the history
  • Loading branch information
marteinn committed Feb 24, 2024
1 parent b0adcb7 commit 038bec1
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 10 deletions.
37 changes: 30 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,34 @@ references:
keys:
- v2-repo-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }}

executors:
base:
docker:
- image: cimg/base:stable-22.04
elixir_with_postgres:
docker:
- image: ghcr.io/frojd/dockerimages/elixir-ubuntu-22-04:1.16
environment:
DATABASE_USER: postgres
DATABASE_PASSWORD: postgres
DATABASE_NAME: postgres
DATABASE_TEST_NAME: circle_test
DATABASE_HOST: localhost
DATABASE_PORT: 5432
- image: postgis/postgis:10-2.5-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
POSTGRES_HOST_AUTH_METHOD: trust
python:
docker:
- image: cimg/python:3.8.13

jobs:
checkout_code:
<<: *defaults
docker:
- image: frojd/elixir-ubuntu-20-04:1.13
- image: postgis/postgis:12-2.5-alpine
- image: circleci/python:3.8
executor: base
steps:
- checkout
- save_cache:
Expand All @@ -50,6 +71,7 @@ jobs:
- .
phoenix:
<<: *defaults
executor: elixir_with_postgres
docker:
- image: frojd/elixir-ubuntu-20-04:1.13
environment:
Expand Down Expand Up @@ -107,20 +129,21 @@ jobs:

deploy:
<<: *defaults
docker:
- image: circleci/python:3.8
executor: python
steps:
- *attach_workspace
- *restore_repo
- restore_cache:
keys:
- v2-phoenix-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }}
- v2-deploy-{{ checksum "deploy/requirements.txt" }}
- run:
command: |
sudo apt-get update && sudo apt-get install -y rsync
- run:
command: |
cd deploy
python3 -m venv venv
sudo apt-get -y -qq install rsync
. venv/bin/activate
pip install -r requirements.txt
ansible-galaxy install -r requirements.yml
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
### Changed
### Fixed
- Upgrade Elixir to 1.16
- Upgrade Ubuntu to 22.04
- Add Circle CI executors

### Removed

## [2.1.0] - 2022-01-06

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ This is a Phoenix/Elixir boilerplate that includes a auto-setup, docker support

## Features

- Built in compile target support for Ubuntu 20.04
- Elixir 1.13
- Built in compile target support for Ubuntu 22.04
- Elixir 1.16
- Phoenix 1.6
- Auto scaffolding (with `phx.new`)
- Dependencies and db migrations are automatically run when starting/restarting docker
Expand Down
2 changes: 1 addition & 1 deletion src/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM elixir:1.13
FROM ghcr.io/frojd/dockerimages/elixir-ubuntu-22-04:1.16

ENV SCAFFOLD_APP_NAME=phoenix_app \
DATABASE_USER=postgres \
Expand Down

0 comments on commit 038bec1

Please sign in to comment.