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
|
||||
|
||||
|
@ -28,6 +28,15 @@ WORKDIR $HOME
|
|||
|
||||
EXPOSE 8080
|
||||
|
||||
# install dependencies
|
||||
RUN yarn install
|
||||
|
||||
WORKDIR $HOME/frequi
|
||||
|
||||
FROM dev as vscode
|
||||
|
||||
WORKDIR $HOME
|
||||
|
||||
# load ssh key in bash terminal
|
||||
RUN echo "eval \$(ssh-agent) && ssh-add ~/.ssh/id_rsa" >> .bashrc
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* cSpell:disable */
|
||||
{
|
||||
"name": "frequi",
|
||||
"dockerComposeFile": "docker-compose.yml",
|
||||
"dockerComposeFile": ["docker-compose.yml","docker-compose.vscode.yml"],
|
||||
"service": "web",
|
||||
"workspaceFolder": "/home/dev/frequi",
|
||||
"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:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
target: dev
|
||||
image: freqtradeorg/frequi:dev
|
||||
user: dev
|
||||
volumes:
|
||||
- ../:/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"
|
||||
networks:
|
||||
- frequi
|
||||
ports:
|
||||
- 8080:8080
|
||||
|
||||
networks:
|
||||
frequi:
|
||||
|
||||
volumes:
|
||||
frequi-bashhistory:
|
||||
frequi-vscode-server:
|
||||
frequi-server-insiders:
|
27
README.md
27
README.md
|
@ -37,6 +37,27 @@ npm run lint
|
|||
### Customize configuration
|
||||
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
|
||||
|
||||
The goal is it have a complete dev environment very quickly and isolated.
|
||||
|
@ -49,11 +70,7 @@ Follow [getting strated](https://code.visualstudio.com/docs/remote/containers#_g
|
|||
|
||||
View > Command palette > Enter: Remote-Containers rebuild container
|
||||
|
||||
### Install dependencies and serve your local server
|
||||
|
||||
```
|
||||
yarn install
|
||||
```
|
||||
### Serve your local server
|
||||
|
||||
```
|
||||
yarn serve
|
||||
|
|
Loading…
Reference in New Issue
Block a user