mirror of
https://github.com/2ec0b4/kaamelott-soundboard.git
synced 2025-12-08 15:43:24 +00:00
(master) Modifie la configuration Docker
This commit is contained in:
6
.docker/base/Dockerfile
Normal file
6
.docker/base/Dockerfile
Normal file
@@ -0,0 +1,6 @@
|
||||
FROM alpine:3.10
|
||||
WORKDIR /app
|
||||
RUN set -xe && \
|
||||
apk -U add bash git curl wget npm && \
|
||||
npm install -g bower && \
|
||||
npm install -g gulp
|
||||
10
Dockerfile
10
Dockerfile
@@ -1,10 +0,0 @@
|
||||
FROM alpine:3.10 AS builder
|
||||
WORKDIR /app
|
||||
COPY . /app
|
||||
RUN set -xe && \
|
||||
apk -U add git curl wget npm && \
|
||||
npm install -g bower && \
|
||||
bower install --allow-root
|
||||
|
||||
FROM httpd:2.4
|
||||
COPY --from=builder /app /usr/local/apache2/htdocs
|
||||
12
Makefile
Executable file
12
Makefile
Executable file
@@ -0,0 +1,12 @@
|
||||
install:
|
||||
docker build -t ks-base .docker/base
|
||||
docker-compose -f docker-compose.builder.yml run --rm install
|
||||
|
||||
start:
|
||||
docker run -dit --rm --name ks-server -p 8000:80 -v `pwd`:/usr/local/apache2/htdocs/ httpd:2.4
|
||||
|
||||
stop:
|
||||
docker stop ks-server
|
||||
|
||||
build:
|
||||
docker-compose -f docker-compose.builder.yml run --rm build
|
||||
@@ -10,11 +10,10 @@ Alors, c'est classe ou c'est pas classe ? Ou c'est classe ?
|
||||
|
||||
Pour faire fonctionner le projet sur votre machine, vous devrez tout d'abord, depuis la racine, exécuter la commande `bower install` puis accéder au fichier `index.html` via le serveur Web de votre choix (Apache pour moi, quand je ne suis pas sioux et que je ne m'y prends pas comme un commanche). Sinon vous pouvez aussi utiliser [Docker](https://www.docker.com/) avec les 2 commandes suivantes :
|
||||
```bash
|
||||
docker build -t 2ec0b4/kaamelott-soundboard .
|
||||
docker run -it --rm --name kaamelott-soundboard -p 80:80 -t 2ec0b4/kaamelott-soundboard
|
||||
make install
|
||||
make start
|
||||
```
|
||||
+ Pour les utilisateurs Windows 10 : Rendez-vous sur la page [http://localhost]()
|
||||
+ Pour les utilisateurs Windows 7 : Rendez-vous sur la page [http://192.168.99.100]()
|
||||
(cf. le fichier `Makefile`)
|
||||
|
||||
Whoooohoooo woa c'est mortel !
|
||||
|
||||
|
||||
16
docker-compose.builder.yml
Normal file
16
docker-compose.builder.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
base:
|
||||
image: ks-base
|
||||
volumes:
|
||||
- .:/usr/src/service/
|
||||
working_dir: /usr/src/service/
|
||||
install:
|
||||
extends:
|
||||
service: base
|
||||
command: bash -c "npm install && bower install --allow-root"
|
||||
build:
|
||||
extends:
|
||||
service: base
|
||||
command: bash -c "gulp init && gulp build"
|
||||
Reference in New Issue
Block a user