Advertisement
Guest User

Docker-compose

a guest
Sep 19th, 2018
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. zaristar@ip-172-31-40-98:~/zartk$ cat docker-compose.yml
  2. version: '2'
  3.  
  4. services:
  5. db:
  6. image: mysql:latest
  7. volumes:
  8. - ./db:/var/lib/mysql
  9. restart: always
  10. environment:
  11. MYSQL_ROOT_PASSWORD: Bcrfhbjn91!
  12. MYSQL_DATABASE: wordpress
  13. MYSQL_USER: wordpressuser
  14. MYSQL_PASSWORD: woof
  15. command: docker exec zartk_db_1 mysql -u wordpressuser --password=woof wordpress < /docker-entrypoint-initdb.d/wordpress.sql
  16.  
  17. wordpress:
  18. depends_on:
  19. - db
  20. image: wordpress:latest
  21. restart: always
  22. volumes:
  23. - ./html/wordpress:/var/www/html
  24. environment:
  25. WORDPRESS_DB_HOST: db:3306
  26. WORDPRESS_DB_USER: wordpressuser
  27. WORDPRESS_DB_PASSWORD: woof
  28. WORDPRESS_DB_NAME: wordpress
  29.  
  30. certnginx:
  31. depends_on:
  32. - wordpress
  33. restart: always
  34. cap_add:
  35. - NET_ADMIN
  36. image: linuxserver/letsencrypt
  37. volumes:
  38. - ./log/nginxaccesslog:/var/log/nginx/log/
  39. - ./certnginx:/config
  40. ports:
  41. - "80:80"
  42. - "443:443"
  43. environment:
  44. - PUID=1050
  45. - PGID=1050
  46. - EMAIL=zaristar89@gmail.com
  47. - URL=zaristar.tk
  48. - SUBDOMAINS=www
  49. - TZ=Europe/Kiev
  50. - VALIDATION=http
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement