diff --git a/Brewfile b/Brewfile new file mode 100644 index 0000000..a1730b0 --- /dev/null +++ b/Brewfile @@ -0,0 +1,3 @@ +brew "docker" +cask "orbstack" +brew "asdf" diff --git a/Brewfile.lock.json b/Brewfile.lock.json new file mode 100644 index 0000000..4f05fa4 --- /dev/null +++ b/Brewfile.lock.json @@ -0,0 +1,84 @@ +{ + "entries": { + "brew": { + "docker": { + "version": "24.0.3", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_ventura": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/docker/blobs/sha256:0361cec07143b7daffca8c0805adfceed25acc06874cb1f92d6f556bdfca788a", + "sha256": "0361cec07143b7daffca8c0805adfceed25acc06874cb1f92d6f556bdfca788a" + }, + "arm64_monterey": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/docker/blobs/sha256:0361cec07143b7daffca8c0805adfceed25acc06874cb1f92d6f556bdfca788a", + "sha256": "0361cec07143b7daffca8c0805adfceed25acc06874cb1f92d6f556bdfca788a" + }, + "arm64_big_sur": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/docker/blobs/sha256:0361cec07143b7daffca8c0805adfceed25acc06874cb1f92d6f556bdfca788a", + "sha256": "0361cec07143b7daffca8c0805adfceed25acc06874cb1f92d6f556bdfca788a" + }, + "ventura": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/docker/blobs/sha256:62c08f5acf2e664ea940ba5351757bd54407f31b3874f291cfde35e95fe592cd", + "sha256": "62c08f5acf2e664ea940ba5351757bd54407f31b3874f291cfde35e95fe592cd" + }, + "monterey": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/docker/blobs/sha256:62c08f5acf2e664ea940ba5351757bd54407f31b3874f291cfde35e95fe592cd", + "sha256": "62c08f5acf2e664ea940ba5351757bd54407f31b3874f291cfde35e95fe592cd" + }, + "big_sur": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/docker/blobs/sha256:62c08f5acf2e664ea940ba5351757bd54407f31b3874f291cfde35e95fe592cd", + "sha256": "62c08f5acf2e664ea940ba5351757bd54407f31b3874f291cfde35e95fe592cd" + }, + "x86_64_linux": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/docker/blobs/sha256:6750e3e24ecb2157d13d527398840572323688a746dca2ebf38e979e4779286e", + "sha256": "6750e3e24ecb2157d13d527398840572323688a746dca2ebf38e979e4779286e" + } + } + } + }, + "asdf": { + "version": "0.12.0", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "all": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/asdf/blobs/sha256:d96303f7e926935adfbe217ee7f157427cc5877a24894baa59500d6c27c215af", + "sha256": "d96303f7e926935adfbe217ee7f157427cc5877a24894baa59500d6c27c215af" + } + } + } + } + }, + "cask": { + "orbstack": { + "version": "0.13.0_1910", + "options": { + "full_name": "orbstack" + } + } + } + }, + "system": { + "macos": { + "ventura": { + "HOMEBREW_VERSION": "4.0.28-16-g4bbc0af", + "HOMEBREW_PREFIX": "/opt/homebrew", + "Homebrew/homebrew-core": "api", + "CLT": "14.3.1.0.1.1683849156", + "Xcode": "14.3.1", + "macOS": "13.4.1" + } + } + } +} diff --git a/README.md b/README.md index 89a8375..9466d19 100644 --- a/README.md +++ b/README.md @@ -1,45 +1,37 @@ -[![CI](https://github.com/ripple0328/outdoor/actions/workflows/ci.yml/badge.svg)](https://github.com/ripple0328/outdoor/actions/workflows/ci.yml) +[![Build](https://github.com/ripple0328/outdoor/actions/workflows/ci.yml/badge.svg)](https://github.com/ripple0328/outdoor/actions/workflows/ci.yml) # Outdoor +Outdoor is a application that allow creating and sharing outdoor activities. ## Getting Started -These instructions will guide you on how to deploy the app using Docker and how to run it locally for development. - -### Deploying with Docker - -1. Build the Docker image: +These instructions will guide you on how start the app locally for development +1. Install dependencies ```bash -docker build -t outdoor-app . +brew bundle +asdf install +mix deps.get ``` - -2. Run the Docker container: - -```bash -docker run -p 4000:4000 outdoor-app - -### Deploying to fly.io - -1. Install the fly.io CLI by running `brew install flyctl` on MacOS or `curl -L https://fly.io/install.sh | sh` on Linux. -2. Login to fly.io by running `flyctl auth login`. -3. Create a new app on fly.io by running `flyctl apps create`. -4. Deploy the app by running `flyctl deploy`. -5. Check the status of the deployment by running `flyctl status`. - -### Running Database Migrations - -Run the following command to execute database migrations: +2. Sart DB, Create and migrate your database ```bash +docker compose up +mix ecto.create mix ecto.migrate ``` -### Running Locally for Development - +3. Start the app To start the app locally for development, run the following command: ```bash mix phx.server -``` \ No newline at end of file +``` +try accessing it via http://localhost:4000 + +4. Run tests + +```bash +mix test +```