Add .devcontainer (#1032)

Adds support for [devcontainers](https://containers.dev/), this should
make onboarding easier and should allow (especially simpler)
contributions entirely online via Github Codespaces 🚀
This commit is contained in:
Jonas De Kegel
2023-05-15 17:04:28 +02:00
committed by GitHub
parent 54f9b712e4
commit 15b51921b2
5 changed files with 32 additions and 3 deletions

View File

@@ -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"
}

View File

@@ -0,0 +1,6 @@
version: '3.8'
services:
actual-development:
volumes:
- ..:/workspaces:cached
command: /bin/sh -c "while sleep 1000; do :; done"

View File

@@ -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.

View File

@@ -12,5 +12,5 @@ services:
- '3001:3001'
volumes:
- '.:/app'
restart: no
restart: 'no'

View File

@@ -0,0 +1,6 @@
---
category: Maintenance
authors: [jlsjonas]
---
Adds support for dev containers, allowing for easier contributions.