image per container
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Sergio Álvarez 2022-01-11 08:16:54 +01:00
parent 2318850832
commit c2856bd2c0
No known key found for this signature in database
GPG Key ID: 622780889DFDBDA5
5 changed files with 49 additions and 16 deletions

View File

@ -19,10 +19,46 @@ steps:
- name: host_docker_sock
path: /var/run/docker.sock
- name: build-docker-image
- name: build-php-image
image: plugins/docker
settings:
dockerfile: docker/Dockerfile.drone
dockerfile: docker/Dockerfile.php
auto_tag: true
repo: registry.xrg.io/xrg.es
registry: https://registry.xrg.io
username:
from_secret: registry_username
password:
from_secret: registry_password
volumes:
- name: host_docker_sock
path: /var/run/docker.sock
depends_on:
- frontend
- backend
- name: build-nginx-image
image: plugins/docker
settings:
dockerfile: docker/Dockerfile.nginx
auto_tag: true
repo: registry.xrg.io/xrg.es
registry: https://registry.xrg.io
username:
from_secret: registry_username
password:
from_secret: registry_password
volumes:
- name: host_docker_sock
path: /var/run/docker.sock
depends_on:
- frontend
- backend
- name: build-redis-image
image: plugins/docker
settings:
dockerfile: docker/Dockerfile.redis
auto_tag: true
repo: registry.xrg.io/xrg.es
registry: https://registry.xrg.io
@ -36,9 +72,6 @@ steps:
depends_on:
- frontend
- backend
#when:
# event:
# - tag
volumes:
- name: host_docker_sock

4
docker/Dockerfile.nginx Normal file
View File

@ -0,0 +1,4 @@
FROM nginx:latest
COPY docker/zz-default-nginx.conf /etc/nginx/conf.d/default.conf
COPY frontend/build /var/www/frontend

View File

@ -21,5 +21,4 @@ RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
COPY docker/zz-custom-php.ini "$PHP_INI_DIR/conf.d/"
COPY docker/zz-custom-phpfpm.conf /usr/local/etc/php-fpm.d/zz-docker.conf
COPY frontend/build /var/www/frontend
COPY backend /var/www/backend

3
docker/Dockerfile.redis Normal file
View File

@ -0,0 +1,3 @@
FROM redis:latest
COPY docker/redis.conf /usr/local/etc/redis/redis.conf

View File

@ -2,28 +2,22 @@ version: '3.8'
services:
xrges-nginx:
image: nginx:latest
image: registry.xrg.io/xrg.es/nginx:latest
restart: unless-stopped
ports:
- "8086:80"
volumes:
- ../frontend/build:/var/www/frontend
- ./zz-default-nginx.conf:/etc/nginx/conf.d/default.conf
links:
- xrges-php
xrges-php:
build: .
image: registry.xrg.io/xrg.es/php:latest
restart: unless-stopped
volumes:
- ../backend:/var/www/backend
xrges-redis:
image: redis:latest
image: registry.xrg.io/xrg.es/redis:latest
restart: unless-stopped
volumes:
- ../home/redis:/data
- ./redis.conf:/usr/local/etc/redis/redis.conf
- ./redis:/data
command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ]
networks: