Use two Dockerfiles, move Docker stuff to /docker

This commit is contained in:
zeke 2024-02-01 18:05:08 -08:00
parent ea99ddc6f6
commit dcc936b35d
9 changed files with 262 additions and 4 deletions

View file

@ -1,23 +1,31 @@
services:
#nginx webserver + php 8.x
web:
image: nginx:1.25.3-alpine
build:
context: .
dockerfile: ./docker/nginx/Dockerfile
ports:
- "8080:80"
depends_on:
- db
volumes:
- ./:/code
- ./site.conf:/etc/nginx/conf.d/default.conf
- ./docker/nginx/leftypol.conf:/etc/nginx/conf.d/default.conf
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./docker/nginx/proxy.conf:/etc/nginx/conf.d/proxy.conf
networks:
leftchan_net:
ipv4_address: 172.20.0.3
links:
- php
php:
build: .
build:
context: .
dockerfile: ./docker/php/Dockerfile
volumes:
- ./:/code
- ./docker/php/custom.ini:/usr/local/etc/php/conf.d/custom.ini
- ./docker/php/www.conf:/usr/local/etc/php-fpm.d/www.conf
networks:
leftchan_net:
ipv4_address: 172.20.0.4
@ -42,4 +50,4 @@ networks:
ipam:
driver: default
config:
- subnet: 172.20.0.0/16
- subnet: 172.20.0.0/16