Remove docker-compose wrapper script; fixes to devcontainers
This commit is contained in:
parent
db84d80e74
commit
17fa857609
7 changed files with 17 additions and 54 deletions
|
@ -1,69 +0,0 @@
|
|||
# Zeppelin development environment
|
||||
Zeppelin's development environment runs entirely within a Docker container.
|
||||
Below you can find instructions for setting up the environment and getting started with development!
|
||||
|
||||
## Starting the development environment
|
||||
|
||||
### Using VSCode devcontainers
|
||||
1. Install Docker
|
||||
2. Make a copy of `.env.example` called `.env`
|
||||
3. Fill in the missing values in `.env`
|
||||
4. In VSCode: Install the `Remote - Containers` plugin
|
||||
5. In VSCode: Run `Remote-Containers: Open Folder in Container...` and select the Zeppelin folder
|
||||
|
||||
### Using VSCode remote SSH plugin
|
||||
1. Install Docker
|
||||
2. Make a copy of `.env.example` called `.env`
|
||||
3. Fill in the missing values in `.env`
|
||||
4. Run `./docker-compose-dev.sh up` to start the development environment
|
||||
5. In VSCode: Install the `Remote - SSH` plugin
|
||||
6. In VSCode: Run `Remote-SSH: Connect to Host...`
|
||||
* As the address, use `ubuntu@127.0.0.1:3002` (where `3002` matches `DOCKER_DEV_SSH_PORT` in `.env`)
|
||||
* Use the password specified in `.env` as `DOCKER_DEV_SSH_PASSWORD`
|
||||
7. In VSCode: Once connected, click `Open folder...` and select `/home/ubuntu/zeppelin`
|
||||
|
||||
### Using JetBrains Gateway
|
||||
1. Install Docker
|
||||
2. Make a copy of `.env.example` called `.env`
|
||||
3. Fill in the missing values in `.env`
|
||||
4. Run `./docker-compose-dev.sh up` to start the development environment
|
||||
5. Choose `Connect via SSH` and create a new connection:
|
||||
* Username: `ubuntu`
|
||||
* Host: `127.0.0.1`
|
||||
* Port: `3002` (matching the `DOCKER_DEV_SSH_PORT` value in `.env`)
|
||||
6. Click `Check Connection and Continue` and enter the password specified in `.env` as `DOCKER_DEV_SSH_PASSWORD` when asked
|
||||
7. In the next pane:
|
||||
* IDE version: WebStorm, PHPStorm, or IntelliJ IDEA
|
||||
* Project directory: `/home/ubuntu/zeppelin`
|
||||
8. Click `Download and Start IDE`
|
||||
|
||||
### Using any other IDE with SSH development support
|
||||
1. Install Docker
|
||||
2. Make a copy of `.env.example` called `.env`
|
||||
3. Fill in the missing values in `.env`
|
||||
4. Run `./docker-compose-dev.sh up` to start the development environment
|
||||
5. Use the following credentials for connecting with your IDE:
|
||||
* Host: `127.0.0.1`
|
||||
* Port: `3002` (matching the `DOCKER_DEV_SSH_PORT` value in `.env`)
|
||||
* Username: `ubuntu`
|
||||
* Password: As specified in `.env` as `DOCKER_DEV_SSH_PASSWORD`
|
||||
|
||||
## Starting the project
|
||||
|
||||
### Starting the backend (bot + api)
|
||||
These commands are run inside the dev container. You should be able to open a terminal in your IDE after connecting.
|
||||
|
||||
1. `cd ~/zeppelin/backend`
|
||||
2. `npm ci`
|
||||
3. `npm run migrate-dev`
|
||||
4. `npm run watch`
|
||||
|
||||
### Starting the dashboard
|
||||
These commands are run inside the dev container. You should be able to open a terminal in your IDE after connecting.
|
||||
|
||||
1. `cd ~/zeppelin/dashboard`
|
||||
2. `npm ci`
|
||||
3. `npm run watch-build`
|
||||
|
||||
### Opening the dashboard
|
||||
Browse to https://localhost:3300 to view the dashboard
|
|
@ -1,6 +1,6 @@
|
|||
FROM ubuntu:20.04
|
||||
|
||||
ARG DOCKER_UID=1000
|
||||
ARG DOCKER_DEV_UID
|
||||
ARG DOCKER_DEV_SSH_PASSWORD
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
@ -13,7 +13,7 @@ RUN apt-get install -y sudo git curl
|
|||
# Set up SSH access
|
||||
RUN apt-get install -y openssh-server iptables
|
||||
RUN mkdir /var/run/sshd
|
||||
RUN useradd -rm -d /home/ubuntu -s /bin/bash -g root -G sudo -u $DOCKER_UID ubuntu
|
||||
RUN useradd -rm -d /home/ubuntu -s /bin/bash -g root -G sudo -u $DOCKER_DEV_UID ubuntu
|
||||
RUN echo "ubuntu:${DOCKER_DEV_SSH_PASSWORD}" | chpasswd
|
||||
|
||||
# Set up proper permissions for volumes
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
version: '3'
|
||||
volumes:
|
||||
mysql-data: {}
|
||||
vscode-remote: {}
|
||||
vscode-server: {}
|
||||
jetbrains-data: {}
|
||||
services:
|
||||
nginx:
|
||||
build:
|
||||
context: ./nginx
|
||||
args:
|
||||
DOCKER_DEV_WEB_PORT: ${DOCKER_DEV_WEB_PORT:?Missing DOCKER_DEV_WEB_PORT}
|
||||
API_PORT: ${API_PORT:?Missing API_PORT}
|
||||
ports:
|
||||
- "${DOCKER_DEV_WEB_PORT:?Missing DOCKER_DEV_WEB_PORT}:443"
|
||||
volumes:
|
||||
- ../../:/zeppelin
|
||||
|
||||
mysql:
|
||||
image: mysql:8.0
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: ${DOCKER_DEV_MYSQL_ROOT_PASSWORD?:Missing DOCKER_DEV_MYSQL_ROOT_PASSWORD}
|
||||
MYSQL_DATABASE: zeppelin
|
||||
MYSQL_USER: zeppelin
|
||||
MYSQL_PASSWORD: ${DOCKER_DEV_MYSQL_PASSWORD?:Missing DOCKER_DEV_MYSQL_PASSWORD}
|
||||
ports:
|
||||
- ${DOCKER_DEV_MYSQL_PORT:?Missing DOCKER_DEV_MYSQL_PORT}:3306
|
||||
volumes:
|
||||
- mysql-data:/var/lib/mysql
|
||||
command: --authentication-policy=mysql_native_password
|
||||
|
||||
devenv:
|
||||
build:
|
||||
context: ./devenv
|
||||
args:
|
||||
DOCKER_DEV_SSH_PASSWORD: ${DOCKER_DEV_SSH_PASSWORD:?Missing DOCKER_DEV_SSH_PASSWORD}
|
||||
DOCKER_UID: ${DOCKER_UID:?Missing DOCKER_UID}
|
||||
DOCKER_STAY_RUNNING: ${DOCKER_STAY_RUNNING}
|
||||
ports:
|
||||
- "${DOCKER_DEV_SSH_PORT:?Missing DOCKER_DEV_SSH_PORT}:22"
|
||||
volumes:
|
||||
- ../../:/home/ubuntu/zeppelin
|
||||
- ~/.ssh:/home/ubuntu/.ssh
|
||||
- vscode-remote:/home/ubuntu/.vscode-remote
|
||||
- vscode-server:/home/ubuntu/.vscode-server
|
||||
- jetbrains-data:/home/ubuntu/.cache/JetBrains
|
Loading…
Add table
Add a link
Reference in a new issue