|
@@ -0,0 +1,29 @@
|
|
|
|
|
+- hosts: all
|
|
|
|
|
+ remote_user: fooser
|
|
|
|
|
+
|
|
|
|
|
+ tasks:
|
|
|
|
|
+ - name: Create directory where apps will be built
|
|
|
|
|
+ file:
|
|
|
|
|
+ path: /home/fooser/builds
|
|
|
|
|
+ state: directory
|
|
|
|
|
+ mode: 0755
|
|
|
|
|
+
|
|
|
|
|
+ - name: Sync project folders from local to remote
|
|
|
|
|
+ synchronize:
|
|
|
|
|
+ src: .
|
|
|
|
|
+ dest: /home/fooser/builds/rkcr_api
|
|
|
|
|
+
|
|
|
|
|
+ - name: Build image and with buildargs
|
|
|
|
|
+ docker_image:
|
|
|
|
|
+ force: yes
|
|
|
|
|
+ path: /home/fooser/builds/rkcr_api
|
|
|
|
|
+ name: fooser/rkcr
|
|
|
|
|
+ tag: 0.1
|
|
|
|
|
+
|
|
|
|
|
+ - name: Containers up from built image!
|
|
|
|
|
+ docker_container:
|
|
|
|
|
+ name: rkcr
|
|
|
|
|
+ image: fooser/rkcr:0.1
|
|
|
|
|
+ ports:
|
|
|
|
|
+ - "8080:8080"
|
|
|
|
|
+
|