Skip to content

Instantly share code, notes, and snippets.

@mntone
Created August 26, 2018 06:22
Show Gist options
  • Select an option

  • Save mntone/98c573806c2d84dfd5ba0d7a6f4fb14b to your computer and use it in GitHub Desktop.

Select an option

Save mntone/98c573806c2d84dfd5ba0d7a6f4fb14b to your computer and use it in GitHub Desktop.
docker-compose for project SSS
version: '3'
services:
nginx:
image: nginx:alpine
container_name: nginx
ports:
- "80:80"
volumes:
- "./conf.d:/etc/nginx/conf.d"
depends_on:
- node_express
node_express:
image: node:10-alpine
container_name: node_express
hostname: node_express
volumes:
- ".:/src"
working_dir: /src
command: [sh, -c, npm install && npm start]
ports:
- "3000:3000"
depends_on:
- mysql
mysql:
image: mysql:8
container_name: mysql80
hostname: mysql
command: mysqld --character-set-server=utf8 --collation-server=utf8_unicode_ci
ports:
- "3306:3306"
volumes:
- ./mysql/init:/docker-entrypoint-initdb.d
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: owner
MYSQL_PASSWORD: pass1
MYSQL_DATABASE: sss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment