diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 96704d0cf..9b1717de0 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -# Note: You can use any Debian/Ubuntu based image you want. +# Note: You can use any Debian/Ubuntu based image you want. FROM mcr.microsoft.com/vscode/devcontainers/base:ubuntu-20.04 # [Option] Install zsh @@ -23,13 +23,14 @@ RUN apt-get update \ # Clean up && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts/ -# Setting the ENTRYPOINT to docker-init.sh will configure non-root access to -# the Docker socket if "overrideCommand": false is set in devcontainer.json. +# Setting the ENTRYPOINT to docker-init.sh will configure non-root access to +# the Docker socket if "overrideCommand": false is set in devcontainer.json. # The script will also execute CMD if you need to alter startup behaviors. ENTRYPOINT [ "/usr/local/share/docker-init.sh" ] CMD [ "sleep", "infinity" ] # [Optional] Uncomment this section to install additional OS packages. -# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ -# && apt-get -y install --no-install-recommends +RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ + && apt-get -y install --no-install-recommends make \ + && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts/ diff --git a/.devcontainer/devsetup.sh b/.devcontainer/devsetup.sh index 5d21d9854..eb909ba75 100644 --- a/.devcontainer/devsetup.sh +++ b/.devcontainer/devsetup.sh @@ -1,10 +1,6 @@ #!/usr/bin/env bash -cp dev.env .env -cp azuracast.dev.env azuracast.env +make install-cloud-ide +make frontend-build -cp docker-compose.cloudide.yml docker-compose.yml - -docker-compose build web -docker-compose run --rm --user=azuracast web azuracast_install -docker-compose up -d +make up diff --git a/docker-compose.cloudide.yml b/docker-compose.cloudide.yml index 2b9987695..9d97f6faa 100644 --- a/docker-compose.cloudide.yml +++ b/docker-compose.cloudide.yml @@ -32,8 +32,8 @@ services : PUID : ${AZURACAST_PUID:-1000} PGID : ${AZURACAST_PGID:-1000} volumes : - - ./vendor:/var/azuracast/www/vendor - - .:/var/azuracast/www + - ${LOCAL_WORKSPACE_FOLDER:-.}/vendor:/var/azuracast/www/vendor + - ${LOCAL_WORKSPACE_FOLDER:-.}:/var/azuracast/www - www_uploads:/var/azuracast/uploads - tmp_data:/var/azuracast/www_tmp - station_data:/var/azuracast/stations diff --git a/frontend/docker-compose.yml b/frontend/docker-compose.yml index dd923289a..17539b708 100644 --- a/frontend/docker-compose.yml +++ b/frontend/docker-compose.yml @@ -5,9 +5,9 @@ services : context : . user : "${AZURACAST_PUID:-1000}:${AZURACAST_PGID:-1000}" volumes : - - .:/data/frontend - - ../resources/locale:/data/resources/locale - - ../web/static:/data/web/static + - ${LOCAL_WORKSPACE_FOLDER:-..}/frontend:/data/frontend + - ${LOCAL_WORKSPACE_FOLDER:-..}/resources/locale:/data/resources/locale + - ${LOCAL_WORKSPACE_FOLDER:-..}/web/static:/data/web/static - frontend_node_modules:/data/frontend/node_modules volumes :