diff --git a/Dockerfile b/Dockerfile index 8bb3496..a5afe17 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,4 @@ +# FROM php:8.2-fpm FROM php:8.1-fpm # Arguments defined in docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml index 0fb6681..b20460d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,19 +27,39 @@ services: - ./default.conf:/etc/nginx/conf.d/default.conf networks: - template - db: + mariadb: image: mariadb:latest - container_name: template-db + container_name: template-mariadb ports: - 3306:3306 volumes: - - templatedb:/var/lib/mysql + - mariadb:/var/lib/mysql - ./database:/database environment: - MYSQL_ROOT_PASSWORD: password + MARIADB_DATABASE: app + MARIADB_USER: app + MARIADB_PASSWORD: password + MARIADB_ROOT_PASSWORD: password networks: template: ipv4_address: 10.8.0.99 + postgresql: + # image: postgres:latest + image: postgres:14-alpine3.17 + container_name: template-postgres + restart: always + ports: + - 5432:5432 + volumes: + - postgres:/var/lib/postgresql/data + - ./database:/database + environment: + POSTGRES_DB: app + POSTGRES_USER: app + POSTGRES_PASSWORD: password + networks: + template: + ipv4_address: 10.8.0.96 nodejs: image: node:16-alpine container_name: template-node @@ -49,9 +69,13 @@ services: - ./:/var/www working_dir: /var/www entrypoint: ["npm","run", "dev"] + networks: + - template volumes: - templatedb: + mariadb: + driver: local + postgres: driver: local networks: