File tree Expand file tree Collapse file tree 11 files changed +96
-4
lines changed
docker/samson-deployment/latest
provision/roles/webdevops-samson-deployment/tasks
provisioning/samson-deployment/general
provision/roles/webdevops-samson-deployment/tasks
template/Dockerfile/images Expand file tree Collapse file tree 11 files changed +96
-4
lines changed Original file line number Diff line number Diff line change @@ -195,11 +195,12 @@ ADD crontab /etc/cron.d/webdevops-samson-deployment
195195
196196RUN rake assets:precompile \
197197 && /opt/docker/bin/control.sh service.enable cron \
198- && /opt/docker/bin/provision run --tag bootstrap --role webdevops-samson-deployment \
198+ && /opt/docker/bin/provision run --tag bootstrap --role webdevops-base --role webdevops-base-app --role webdevops- samson-deployment \
199199 && /opt/docker/bin/bootstrap.sh
200200
201201
202202EXPOSE 80
203+ VOLUME /storage
203204
204205ENTRYPOINT ["/opt/docker/bin/entrypoint.sh" ]
205206CMD ["supervisord" ]
Original file line number Diff line number Diff line change 3838{{ samsonDeployment.general() }}
3939
4040{{ docker.expose('80') }}
41+ {{ docker.volume('/storage') }}
4142
4243{{ docker.entrypoint("/opt/docker/bin/entrypoint.sh") }}
4344{{ docker.cmd("supervisord") }}
Original file line number Diff line number Diff line change 1+ # Prevent startup of nginx (ubuntu 16.04 needs it)
2+ ln -f -s /var/lib/nginx/logs /var/log/nginx
3+
4+ # Replace markers
5+ find /opt/docker/etc/nginx/ -iname ' *.conf' -print0 | xargs -0 -r rpl --quiet " <ALIAS_DOMAIN>" " $WEB_ALIAS_DOMAIN "
6+ find /opt/docker/etc/nginx/ -iname ' *.conf' -print0 | xargs -0 -r rpl --quiet " <SERVERNAME>" " $HOSTNAME "
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ source /opt/docker/bin/config.sh
4+
5+ includeScriptDir " /opt/docker/bin/service.d/nginx.d/"
6+
7+ exec /usr/sbin/nginx
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ programs=nginxd
33priority=20
44
55[program:nginxd]
6- command = /usr/sbin/ nginx
6+ command = /opt/docker/bin/service.d/ nginx.sh
77process_name=%( program_name) s
88startsecs = 0
99autostart = true
Original file line number Diff line number Diff line change 3535 group : " {{ APPLICATION_GROUP }}"
3636 mode : u=rwX,g=rX,o=rX
3737 recurse : yes
38+
39+ - name : Remove old log directory
40+ file :
41+ path : " /var/lib/nginx/logs"
42+ state : absent
43+
44+ - name : Create log directory
45+ file :
46+ path : " /var/lib/nginx/logs"
47+ state : directory
48+
49+ - name : Create stdout symlinks
50+ file :
51+ dest : " {{ item }}"
52+ src : " /docker.stdout"
53+ state : link
54+ force : yes
55+ with_items :
56+ - " /var/lib/nginx/logs/access.log"
57+ - " /var/lib/nginx/logs/error.log"
58+
59+ - name : Create storage directories
60+ file :
61+ path : " {{ item }}"
62+ state : directory
63+ owner : " {{ APPLICATION_USER }}"
64+ group : " {{ APPLICATION_GROUP }}"
65+ mode : u=rwX,g=rX,o=rX
66+ recurse : yes
67+ with_items :
68+ - " /storage"
69+ - " /storage/db"
Original file line number Diff line number Diff line change 1+ # Prevent startup of nginx (ubuntu 16.04 needs it)
2+ ln -f -s /var/lib/nginx/logs /var/log/nginx
3+
4+ # Replace markers
5+ find /opt/docker/etc/nginx/ -iname ' *.conf' -print0 | xargs -0 -r rpl --quiet " <ALIAS_DOMAIN>" " $WEB_ALIAS_DOMAIN "
6+ find /opt/docker/etc/nginx/ -iname ' *.conf' -print0 | xargs -0 -r rpl --quiet " <SERVERNAME>" " $HOSTNAME "
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ source /opt/docker/bin/config.sh
4+
5+ includeScriptDir " /opt/docker/bin/service.d/nginx.d/"
6+
7+ exec /usr/sbin/nginx
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ programs=nginxd
33priority=20
44
55[program:nginxd]
6- command = /usr/sbin/ nginx
6+ command = /opt/docker/bin/service.d/ nginx.sh
77process_name=%( program_name) s
88startsecs = 0
99autostart = true
Original file line number Diff line number Diff line change 3535 group : " {{ APPLICATION_GROUP }}"
3636 mode : u=rwX,g=rX,o=rX
3737 recurse : yes
38+
39+ - name : Remove old log directory
40+ file :
41+ path : " /var/lib/nginx/logs"
42+ state : absent
43+
44+ - name : Create log directory
45+ file :
46+ path : " /var/lib/nginx/logs"
47+ state : directory
48+
49+ - name : Create stdout symlinks
50+ file :
51+ dest : " {{ item }}"
52+ src : " /docker.stdout"
53+ state : link
54+ force : yes
55+ with_items :
56+ - " /var/lib/nginx/logs/access.log"
57+ - " /var/lib/nginx/logs/error.log"
58+
59+ - name : Create storage directories
60+ file :
61+ path : " {{ item }}"
62+ state : directory
63+ owner : " {{ APPLICATION_USER }}"
64+ group : " {{ APPLICATION_GROUP }}"
65+ mode : u=rwX,g=rX,o=rX
66+ recurse : yes
67+ with_items :
68+ - " /storage"
69+ - " /storage/db"
You can’t perform that action at this time.
0 commit comments