diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index b268b411..4381ccc6 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -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" } \ No newline at end of file diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 6ac2c5fd..8df530f1 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -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: diff --git a/README.md b/README.md index 6e9337bf..caff8006 100644 --- a/README.md +++ b/README.md @@ -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 . -```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 use initial admin user to login (email: admin@admin.com, password: foobar). ## Test