Compare commits
No commits in common. "eb7c227cd2333c7f66e399d99748bf4bcb420b87" and "cafd520a6c3adcfe505b559f99ca2307e67fe864" have entirely different histories.
eb7c227cd2
...
cafd520a6c
73
.drone.yml
73
.drone.yml
@ -4,19 +4,17 @@ type: docker
|
|||||||
name: Build
|
name: Build
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build_release
|
- name: build
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
commands:
|
commands:
|
||||||
- sleep 5
|
- sleep 5
|
||||||
- docker build -t docker.pbiernat.dev/nginx-php .
|
- docker build -t docker.pbiernat.dev/nginx-php .
|
||||||
- docker images | grep nginx-php
|
- docker images | grep nginx-php
|
||||||
when:
|
|
||||||
event: tag
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: docker-sock
|
- name: docker-sock
|
||||||
path: /var/run
|
path: /var/run
|
||||||
|
|
||||||
- name: publish_release
|
- name: publish
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
environment:
|
environment:
|
||||||
DOCKER_USERNAME:
|
DOCKER_USERNAME:
|
||||||
@ -28,71 +26,7 @@ steps:
|
|||||||
- docker login docker.pbiernat.dev -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
|
- docker login docker.pbiernat.dev -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
|
||||||
- docker push docker.pbiernat.dev/nginx-php
|
- docker push docker.pbiernat.dev/nginx-php
|
||||||
when:
|
when:
|
||||||
event: tag
|
branch: master
|
||||||
volumes:
|
|
||||||
- name: docker-sock
|
|
||||||
path: /var/run
|
|
||||||
|
|
||||||
- name: build_develop
|
|
||||||
image: plugins/docker
|
|
||||||
commands:
|
|
||||||
- sleep 5
|
|
||||||
- docker build -t docker.pbiernat.dev/nginx-php:dev .
|
|
||||||
- docker images --format "{{.Repository}}:{{.Tag}}" | grep nginx-php:dev
|
|
||||||
when:
|
|
||||||
branch: develop
|
|
||||||
event: pull_request
|
|
||||||
volumes:
|
|
||||||
- name: docker-sock
|
|
||||||
path: /var/run
|
|
||||||
|
|
||||||
- name: publish_develop
|
|
||||||
image: plugins/docker
|
|
||||||
privileged: true
|
|
||||||
environment:
|
|
||||||
DOCKER_USERNAME:
|
|
||||||
from_secret: registry_username
|
|
||||||
DOCKER_PASSWORD:
|
|
||||||
from_secret: registry_password
|
|
||||||
commands:
|
|
||||||
- sleep 5
|
|
||||||
- docker login docker.pbiernat.dev -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
|
|
||||||
- docker push docker.pbiernat.dev/nginx-php:dev
|
|
||||||
when:
|
|
||||||
branch: develop
|
|
||||||
event: pull_request
|
|
||||||
volumes:
|
|
||||||
- name: docker-sock
|
|
||||||
path: /var/run
|
|
||||||
|
|
||||||
- name: build_feature
|
|
||||||
image: plugins/docker
|
|
||||||
commands:
|
|
||||||
- sleep 5
|
|
||||||
- docker build -t docker.pbiernat.dev/nginx-php:$CI_COMMIT_BRANCH .
|
|
||||||
- docker images --format "{{.Repository}}:{{.Tag}}" | grep nginx-php:${CI_COMMIT_BRANCH}
|
|
||||||
when:
|
|
||||||
branch: feature_*
|
|
||||||
event: push
|
|
||||||
volumes:
|
|
||||||
- name: docker-sock
|
|
||||||
path: /var/run
|
|
||||||
|
|
||||||
- name: publish_feature
|
|
||||||
image: plugins/docker
|
|
||||||
privileged: true
|
|
||||||
environment:
|
|
||||||
DOCKER_USERNAME:
|
|
||||||
from_secret: registry_username
|
|
||||||
DOCKER_PASSWORD:
|
|
||||||
from_secret: registry_password
|
|
||||||
commands:
|
|
||||||
- sleep 5
|
|
||||||
- docker login docker.pbiernat.dev -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
|
|
||||||
- docker push docker.pbiernat.dev/nginx-php:$CI_COMMIT_BRANCH
|
|
||||||
when:
|
|
||||||
branch: feature_*
|
|
||||||
event: push
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: docker-sock
|
- name: docker-sock
|
||||||
path: /var/run
|
path: /var/run
|
||||||
@ -108,3 +42,4 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- name: docker-sock
|
- name: docker-sock
|
||||||
temp: {}
|
temp: {}
|
||||||
|
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
server {
|
server {
|
||||||
listen 80 default_server;
|
listen 80 default_server;
|
||||||
|
listen [::]:80 default_server;
|
||||||
root /var/www/app/public;
|
root /var/www/app/public;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
|
# try to serve file directly, fallback to index.php
|
||||||
try_files $uri /index.php$is_args$args;
|
try_files $uri /index.php$is_args$args;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -12,7 +14,7 @@ server {
|
|||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
|
|
||||||
# optionally set the value of the environment variables used in the application
|
# optionally set the value of the environment variables used in the application
|
||||||
fastcgi_param APP_ENV dev;
|
# fastcgi_param APP_ENV prod;
|
||||||
# fastcgi_param APP_SECRET <app-secret-id>;
|
# fastcgi_param APP_SECRET <app-secret-id>;
|
||||||
# fastcgi_param DATABASE_URL "mysql://db_user:db_pass@host:3306/db_name";
|
# fastcgi_param DATABASE_URL "mysql://db_user:db_pass@host:3306/db_name";
|
||||||
|
|
||||||
@ -25,7 +27,6 @@ server {
|
|||||||
# for more information).
|
# for more information).
|
||||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||||
fastcgi_param DOCUMENT_ROOT $realpath_root;
|
fastcgi_param DOCUMENT_ROOT $realpath_root;
|
||||||
|
|
||||||
# Prevents URIs that include the front controller. This will 404:
|
# Prevents URIs that include the front controller. This will 404:
|
||||||
# http://domain.tld/index.php/some-path
|
# http://domain.tld/index.php/some-path
|
||||||
# Remove the internal directive to allow URIs like this
|
# Remove the internal directive to allow URIs like this
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
logfile=/var/log/supervisord.log
|
logfile=/var/log/supervisord.log
|
||||||
pidfile=/var/run/supervisord.pid
|
pidfile=/var/run/supervisord.pid
|
||||||
nodaemon=false
|
nodaemon=false
|
||||||
user=root
|
|
||||||
|
|
||||||
[program:nginx]
|
[program:nginx]
|
||||||
command=/usr/sbin/nginx -g 'daemon off;'
|
command=/usr/sbin/nginx -g 'daemon off;'
|
||||||
|
Loading…
Reference in New Issue
Block a user