You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

127 lines
2.6 KiB
YAML

version: "3.7"
services:
app:
build:
args:
user: aji
uid: 1000
context: ./
dockerfile: ./Dockerfile
image: voucher
container_name: voucher-app
working_dir: /var/www/
volumes:
- ./:/var/www
- ./user.ini:/usr/local/etc/php/php.ini
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
mem_limit: 512m
mem_reservation: 128M
cpus: 0.5
networks:
- voucher
nginx:
image: nginx:1.17-alpine
container_name: voucher-nginx
ports:
- 8000:80
volumes:
- ./:/var/www
- ./default.conf:/etc/nginx/conf.d/default.conf
mem_limit: 512m
mem_reservation: 128M
cpus: 0.5
networks:
- voucher
nodejs:
image: node:16-alpine
container_name: voucher-node
ports:
- 5173:5173
volumes:
- ./:/var/www
working_dir: /var/www
entrypoint: ["npm","run", "dev"]
mem_limit: 512m
mem_reservation: 128M
cpus: 0.5
networks:
- voucher
mariadb:
image: mariadb:latest
container_name: voucher-mariadb
ports:
- 3306:3306
volumes:
- mariadb:/var/lib/mysql
- ./database:/database
environment:
MARIADB_DATABASE: voucher
MARIADB_USER: aji
MARIADB_PASSWORD: eta
MARIADB_ROOT_PASSWORD: eta
mem_limit: 512m
mem_reservation: 128M
cpus: 1
networks:
voucher:
ipv4_address: 10.25.10.99
postgresql:
image: postgres:14-alpine3.17
container_name: voucher-postgres
ports:
- 5432:5432
volumes:
- postgres:/var/lib/postgresql/data
- ./database:/database
environment:
POSTGRES_DB: voucher
POSTGRES_USER: aji
POSTGRES_PASSWORD: eta
mem_limit: 254m
mem_reservation: 128M
cpus: 0.5
networks:
voucher:
ipv4_address: 10.25.10.199
portainer:
image: portainer/portainer-ce:latest
ports:
- 9443:9443
volumes:
- data:/data
- /var/run/docker.sock:/var/run/docker.sock
networks:
- voucher
phpcli:
image: voucher
container_name: voucher-app-cli
volumes:
- ./:/var/www
working_dir: /var/www
entrypoint: ["php","artisan", "schedule:work"]
mem_limit: 128M
mem_reservation: 128M
cpus: 0.5
depends_on:
- app
networks:
- voucher
volumes:
data:
driver: local
mariadb:
driver: local
postgres:
driver: local
networks:
voucher:
driver: bridge
ipam:
driver: default
config:
- subnet: 10.25.10.0/24
gateway: 10.25.10.1