|
|
|
@ -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:
|
|
|
|
|