Skip to content

Commit 15b5192

Browse files
authored
Add .devcontainer (actualbudget#1032)
Adds support for [devcontainers](https://containers.dev/), this should make onboarding easier and should allow (especially simpler) contributions entirely online via Github Codespaces 🚀
1 parent 54f9b71 commit 15b5192

File tree

5 files changed

+32
-3
lines changed

5 files changed

+32
-3
lines changed

Diff for: .devcontainer/devcontainer.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-docker-compose
3+
{
4+
"name": "Actual development",
5+
"dockerComposeFile": [
6+
"../docker-compose.yml",
7+
"docker-compose.yml"
8+
],
9+
// Alternatively:
10+
// "image": "mcr.microsoft.com/devcontainers/typescript-node:0-16",
11+
"service": "actual-development",
12+
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
13+
"postCreateCommand": "yarn install"
14+
}

Diff for: .devcontainer/docker-compose.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: '3.8'
2+
services:
3+
actual-development:
4+
volumes:
5+
- ..:/workspaces:cached
6+
command: /bin/sh -c "while sleep 1000; do :; done"

Diff for: CONTRIBUTING.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,13 @@ For first time contributions you can also filter the issues labeled with "[good
3737
## Development Environment
3838
If you would like to contribute you can fork this repository and create a branch specific to the project you are working on.
3939

40-
There are two options for developing:
40+
There are three options for developing:
4141
1. Yarn
42-
- 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`.
42+
- 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`.
4343
2. Docker Compose
4444
- 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`.
45+
3. Dev container
46+
- Directly integrated in some IDEs, dependencies will be installed automatically as you enter the container.
47+
- Use your preferred method to `npm start` the project, your IDE should expose the project on your `localhost` for you.
4548

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

Diff for: docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ services:
1212
- '3001:3001'
1313
volumes:
1414
- '.:/app'
15-
restart: no
15+
restart: 'no'
1616

Diff for: upcoming-release-notes/1032.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
category: Maintenance
3+
authors: [jlsjonas]
4+
---
5+
6+
Adds support for dev containers, allowing for easier contributions.

0 commit comments

Comments
 (0)