2023-11-27 22:02:47 +07:00
|
|
|
# ./docker-compose.yml
|
|
|
|
version: '3'
|
|
|
|
|
|
|
|
networks:
|
|
|
|
meme-generator-net:
|
|
|
|
external: true
|
|
|
|
name: "meme-generator-net"
|
|
|
|
|
|
|
|
services:
|
|
|
|
app:
|
|
|
|
image: adhocore/lemp:8.1
|
|
|
|
# For different app you can use different names. (eg: )
|
|
|
|
container_name: memegenerator
|
|
|
|
volumes:
|
|
|
|
# app source code
|
2023-11-27 22:36:49 +07:00
|
|
|
- ./meme-generator-nodejs:/var/www/html
|
2023-11-27 22:02:47 +07:00
|
|
|
# db data persistence
|
|
|
|
# Here you can also volume php ini settings
|
|
|
|
# - /path/to/zz-overrides:/usr/local/etc/php/conf.d/zz-overrides.ini
|
2023-11-27 22:36:49 +07:00
|
|
|
ports:
|
|
|
|
- 3000:3000
|
2023-11-27 22:02:47 +07:00
|
|
|
environment:
|
|
|
|
MYSQL_ROOT_PASSWORD: supersecurepwd
|
|
|
|
MYSQL_DATABASE: appdb
|
|
|
|
MYSQL_USER: dbusr
|
|
|
|
MYSQL_PASSWORD: securepwd
|
|
|
|
# for postgres you can pass in similar env as for mysql but with PGSQL_ prefix
|
|
|
|
networks:
|
|
|
|
- "meme-generator-net"
|
|
|
|
restart: always
|
|
|
|
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
db_data: {}
|