Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add devcontainer support #202

Merged
merged 2 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
{
"name": "Debian",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/base:bullseye",

// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"moby": true,
"azureDnsAutoDetection": true,
"installDockerBuildx": true,
"version": "latest",
"dockerDashComposeVersion": "v1"
},
"ghcr.io/devcontainers/features/go:1": {
"version": "latest"
},
"ghcr.io/devcontainers/features/node:1": {
"nodeGypDependencies": true,
"version": "16" // Match version from Dockerfile
},
"ghcr.io/jungaretti/features/make:1": {}
},
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.makefile-tools"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any other extensions to add? Maybe Go and Vue?

]
}
}

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forward the ADB port?


// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,35 @@
[![Build Status](https://travis-ci.org/dxe/adb.svg?branch=master)](https://travis-ci.org/dxe/adb)

# adb
Activist Database Project

## Run
Activist Database Project

First, download all the needed dependencies. Then start the server by running `make run_all` and going to localhost:8080.
## Local development

## Dependencies
### Dependencies

You will need the following to run this project:
r
* go
* node.js v16
* docker

After installing the above, download all the go and node dependencies by running `make deps`.
After installing the above (already installed in the Devcontainer), download all
the go and node dependencies by running `make deps`.

### Set up mysql locally for development
#### Set up mysql locally for development

There is now a Docker container to run MySQL locally, so just run the following:
```
docker compose up -d
make dev_db
```

## JS
### Run

After downloading the dependencies, start the server by running `make run_all`
and access the web app at localhost:8080.

### JS

This project uses webpack to compile our frontend files. Frontend
files that need to be compiled are in `frontend/`, and the compiled
Expand Down