Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup docker-compose local development #1

Open
wants to merge 2 commits into
base: lpc_dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,31 @@ npm run build

If you wish to enhance this tool, please feel free to do so - generally this is appreciated. However, pull requests will be only accepted if they are clean and match the used coding/markup style.

## Docker local development environment

### docker-compose setup

By using docker-compose we can run a local development environment without installing any software on the local machine, apart from docker and docker-compose.

Install and build the Vue application

```shell
docker-compose run --rm npm install
docker-compose run --rm npm run build
```

Start the web server to serve the content

```shell
docker-compose up web -d
open http://localhost:8080
```

### docker-compose tear down

Remove the running container

```shell
docker-compose down -rm
```

26 changes: 26 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: '3'
networks:
configtool:

services:
web:
image: php:7.4-apache
container_name: web
volumes:
- ./dist:/var/www/html
ports:
- "8080:80"
networks:
- configtool

npm:
image: node:13.7
container_name: npm
environment:
NODE_ENV: "dev"
volumes:
- ./:/var/www/html
working_dir: /var/www/html
entrypoint: ['npm', '--no-bin-files']
networks:
- configtool