Skip to content

Commit

Permalink
Add .devcontainer (actualbudget#1032)
Browse files Browse the repository at this point in the history
Adds support for [devcontainers](https://containers.dev/), this should
make onboarding easier and should allow (especially simpler)
contributions entirely online via Github Codespaces 🚀
  • Loading branch information
jlsjonas committed May 15, 2023
1 parent 7037fb6 commit 2caa2ca
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 3 deletions.
14 changes: 14 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-docker-compose
{
"name": "Actual development",
"dockerComposeFile": [
"../docker-compose.yml",
"docker-compose.yml"
],
// Alternatively:
// "image": "mcr.microsoft.com/devcontainers/typescript-node:0-16",
"service": "actual-development",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"postCreateCommand": "yarn install"
}
6 changes: 6 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: '3.8'
services:
actual-development:
volumes:
- ..:/workspaces:cached
command: /bin/sh -c "while sleep 1000; do :; done"
7 changes: 5 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,13 @@ For first time contributions you can also filter the issues labeled with "[good
## Development Environment
If you would like to contribute you can fork this repository and create a branch specific to the project you are working on.

There are two options for developing:
There are three options for developing:
1. Yarn
- This is the traditional way to get an envrionment stood up. Run `yarn` to install the dependencies followed by `yarn start:browser` to start the development server. You will then be able to access Actual at `localhost:3001`.
- This is the traditional way to get an environment stood up. Run `yarn` to install the dependencies followed by `yarn start:browser` to start the development server. You will then be able to access Actual at `localhost:3001`.
2. Docker Compose
- If you prefer to work with docker containers, a `docker-compose.yml` file is included. Run `docker compose up -d` to start Actual. It will be accessible at `localhost:3001`.
3. Dev container
- Directly integrated in some IDEs, dependencies will be installed automatically as you enter the container.
- Use your preferred method to `npm start` the project, your IDE should expose the project on your `localhost` for you.

Both options above will dynamically update as you make changes to files. If you are making changes to the front end UI, you may have to reload the page to see any changes you make.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ services:
- '3001:3001'
volumes:
- '.:/app'
restart: no
restart: 'no'

6 changes: 6 additions & 0 deletions upcoming-release-notes/1032.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Maintenance
authors: [jlsjonas]
---

Adds support for dev containers, allowing for easier contributions.

0 comments on commit 2caa2ca

Please sign in to comment.