Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
aidewoode committed Aug 2, 2022
1 parent d6f95a3 commit efbfa47
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 53 deletions.
46 changes: 23 additions & 23 deletions .devcontainer/devcontainer.json
Expand Up @@ -2,27 +2,27 @@
// https://github.com/microsoft/vscode-dev-containers/tree/v0.241.1/containers/ruby-rails-postgres
// Update the VARIANT arg in docker-compose.yml to pick a Ruby version
{
"name": "Black Candy",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspace",
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"rebornix.Ruby"
]
}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// This can be used to network with other containers or the host.
"forwardPorts": [
3000
],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "bundle install && yarn install && rake db:prepare",
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
"name": "Black Candy",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspace",
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"rebornix.Ruby"
]
}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// This can be used to network with other containers or the host.
"forwardPorts": [
3000
],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "bundle install && yarn install && rake db:prepare",
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}
2 changes: 1 addition & 1 deletion .devcontainer/docker-compose.yml
Expand Up @@ -49,7 +49,7 @@ services:
# (Adding the "ports" property to this file will not forward from a Codespace.)

redis:
image: redis:4.0-alpine
image: redis:6.0-alpine
volumes:
- redis-data:/data
networks:
Expand Down
36 changes: 7 additions & 29 deletions README.md
Expand Up @@ -86,37 +86,15 @@ $ docker-compose restart
- Postgres 11
- Redis 6.0
- Nodejs 12
- Yarn 1.22
- Imagemagick 7
- ffmpeg 4.3
- Yarn
- Imagemagick
- ffmpeg

You can use [nix](https://nixos.org) to setup dev environment easily.
You can use VS Code Remote Containers or GitHub Codespaces to setup dev environment easily.
For more infomations about dev container, please visit this link <https://code.visualstudio.com/docs/remote/create-dev-container>.

```shell
# First, install nix. You can check out the nix doc for more details.
$ curl -L https://nixos.org/nix/install | sh

# Then clone the repo.
$ git clone https://github.com/aidewoode/black_candy.git

# Change to the directory.
$ cd black_candy

# Go into nix shell, the nix shell will auto setup all dev requirements you need.
$ nix-shell

# Install requirement gems.
$ bundle

# Install npm packages.
$ yarn

# Setup database.
$ rails db:setup

# Finally, start all services.
$ ./bin/dev
```
After the dev container has been built. You can run `./bin/dev` in terminal to start all services.
Then visit <http://localhost:3000> use initial admin user to login (email: admin@admin.com, password: foobar).

## Test

Expand Down

0 comments on commit efbfa47

Please sign in to comment.