mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-10 10:21:55 +00:00
split dev container and dev vscode container
This commit is contained in:
parent
fb7925e7a1
commit
11b7521cc7
|
@ -1,4 +1,4 @@
|
||||||
FROM node:12-stretch
|
FROM node:12-stretch as dev
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
@ -28,6 +28,15 @@ WORKDIR $HOME
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
|
# install dependencies
|
||||||
|
RUN yarn install
|
||||||
|
|
||||||
|
WORKDIR $HOME/frequi
|
||||||
|
|
||||||
|
FROM dev as vscode
|
||||||
|
|
||||||
|
WORKDIR $HOME
|
||||||
|
|
||||||
# load ssh key in bash terminal
|
# load ssh key in bash terminal
|
||||||
RUN echo "eval \$(ssh-agent) && ssh-add ~/.ssh/id_rsa" >> .bashrc
|
RUN echo "eval \$(ssh-agent) && ssh-add ~/.ssh/id_rsa" >> .bashrc
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* cSpell:disable */
|
/* cSpell:disable */
|
||||||
{
|
{
|
||||||
"name": "frequi",
|
"name": "frequi",
|
||||||
"dockerComposeFile": "docker-compose.yml",
|
"dockerComposeFile": ["docker-compose.yml","docker-compose.vscode.yml"],
|
||||||
"service": "web",
|
"service": "web",
|
||||||
"workspaceFolder": "/home/dev/frequi",
|
"workspaceFolder": "/home/dev/frequi",
|
||||||
"settings": {
|
"settings": {
|
||||||
|
|
18
.devcontainer/docker-compose.vscode.yml
Normal file
18
.devcontainer/docker-compose.vscode.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
version: '3.4'
|
||||||
|
services:
|
||||||
|
web:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
target: vscode
|
||||||
|
image: freqtradeorg/frequi:vscode
|
||||||
|
volumes:
|
||||||
|
- "/home/${USER}/.ssh:/home/dev/.ssh:ro"
|
||||||
|
- "/home/${USER}/.gitconfig:/home/dev/.gitconfig:ro"
|
||||||
|
- frequi-bashhistory:/home/dev/commandhistory
|
||||||
|
- frequi-vscode-server:/home/dev/.vscode-server
|
||||||
|
- frequi-server-insiders:/home/dev/.vscode-server-insiders
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
frequi-bashhistory:
|
||||||
|
frequi-vscode-server:
|
||||||
|
frequi-server-insiders:
|
|
@ -3,23 +3,16 @@ services:
|
||||||
web:
|
web:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
target: dev
|
||||||
|
image: freqtradeorg/frequi:dev
|
||||||
user: dev
|
user: dev
|
||||||
volumes:
|
volumes:
|
||||||
- ../:/home/dev/frequi
|
- ../:/home/dev/frequi
|
||||||
- "/home/${USER}/.ssh:/home/dev/.ssh:ro"
|
|
||||||
- "/home/${USER}/.gitconfig:/home/dev/.gitconfig:ro"
|
|
||||||
- frequi-bashhistory:/home/dev/commandhistory
|
|
||||||
- frequi-vscode-server:/home/dev/.vscode-server
|
|
||||||
- frequi-server-insiders:/home/dev/.vscode-server-insiders
|
|
||||||
command: /bin/sh -c "while sleep 1000; do :; done"
|
command: /bin/sh -c "while sleep 1000; do :; done"
|
||||||
networks:
|
networks:
|
||||||
- frequi
|
- frequi
|
||||||
|
ports:
|
||||||
|
- 8080:8080
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
frequi:
|
frequi:
|
||||||
|
|
||||||
volumes:
|
|
||||||
frequi-bashhistory:
|
|
||||||
frequi-vscode-server:
|
|
||||||
frequi-server-insiders:
|
|
29
README.md
29
README.md
|
@ -37,6 +37,27 @@ npm run lint
|
||||||
### Customize configuration
|
### Customize configuration
|
||||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
See [Configuration Reference](https://cli.vuejs.org/config/).
|
||||||
|
|
||||||
|
## Project setup for docker (developing inside dev container) without vscode
|
||||||
|
|
||||||
|
### Built dev docker image and run container(s) detached
|
||||||
|
|
||||||
|
```
|
||||||
|
cd .devcontainer
|
||||||
|
docker-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
### Go inside web service container and serve
|
||||||
|
|
||||||
|
```
|
||||||
|
docker-compose exec web /bin/bash
|
||||||
|
```
|
||||||
|
|
||||||
|
then
|
||||||
|
|
||||||
|
```
|
||||||
|
yarn serve
|
||||||
|
```
|
||||||
|
|
||||||
## Project setup for vscode and docker (developing inside dev container) on linux
|
## Project setup for vscode and docker (developing inside dev container) on linux
|
||||||
|
|
||||||
The goal is it have a complete dev environment very quickly and isolated.
|
The goal is it have a complete dev environment very quickly and isolated.
|
||||||
|
@ -49,14 +70,10 @@ Follow [getting strated](https://code.visualstudio.com/docs/remote/containers#_g
|
||||||
|
|
||||||
View > Command palette > Enter: Remote-Containers rebuild container
|
View > Command palette > Enter: Remote-Containers rebuild container
|
||||||
|
|
||||||
### Install dependencies and serve your local server
|
### Serve your local server
|
||||||
|
|
||||||
```
|
|
||||||
yarn install
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
```
|
||||||
yarn serve
|
yarn serve
|
||||||
```
|
```
|
||||||
|
|
||||||
You now have useful vscode extentions, git support, your command history of the project.
|
You now have useful vscode extentions, git support, your command history of the project.
|
Loading…
Reference in New Issue
Block a user