Last active
December 6, 2018 02:39
-
-
Save devNoiseConsulting/ec4b892e2760303bd4b68ecb586b1413 to your computer and use it in GitHub Desktop.
Ansible Real Device Map
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tasks file for real-device-map | |
- name: Install pip | |
become: true | |
apt: | |
name: python3-pip | |
state: present | |
- name: Install python-docker | |
become: true | |
pip: | |
name: docker | |
state: present | |
- name: Create a network | |
docker_network: | |
name: real-device-map-network | |
- name: "Launch mysql container" | |
docker_container: | |
image: mysql | |
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci | |
name: realdevicemap-db | |
domainname: realdevicemap-db | |
hostname: realdevicemap-db | |
restart_policy: unless-stopped | |
networks: | |
- name: real-device-map-network | |
links: | |
- realdevicemap | |
env: | |
MYSQL_ROOT_PASSWORD: "{{ mysql_root_password }}" | |
MYSQL_DATABASE: "{{ mysql_database }}" | |
MYSQL_USER: "{{ mysql_user }}" | |
MYSQL_PASSWORD: "{{ mysql_password }}" | |
ports: | |
- "3306:3306" | |
- name: "Launch realdevicemap container" | |
docker_container: | |
image: 0815flo/realdevicemap:latest | |
name: realdevicemap | |
domainname: realdevicemap | |
hostname: realdevicemap | |
restart_policy: unless-stopped | |
networks: | |
- name: real-device-map-network | |
links: | |
- realdevicemap-db | |
tty: yes | |
volumes: | |
- "{{ local_images }}:/perfect-deployed/realdevicemap/resources/webroot/static/img" | |
ports: | |
- "9000:9000" | |
- "9001:9001" | |
env: | |
DB_DATABASE: "{{ mysql_database }}" | |
DB_HOST: realdevicemap-db | |
DB_PORT: 3306 | |
DB_USERNAME: "{{ mysql_user }}" | |
DB_PASSWORD: "{{ mysql_password }}" | |
WEB_SERVER_ADDRESS: 0.0.0.0 | |
WEB_SERVER_PORT: 9000 | |
WEBHOOK_SERVER_ADDRESS: 0.0.0.0 | |
WEBHOOK_SERVER_PORT: 9001 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment