Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '3.1'
- services:
- mysql:
- image: mysql
- container_name: mysql
- command: --default-authentication-plugin=mysql_native_password
- restart: always
- environment:
- MYSQL_DATABASE: seemode-db
- MYSQL_USER: See-Mode-Admin
- MYSQL_PASSWORD: Pa55word!
- MYSQL_ROOT_PASSWORD: root-password
- volumes:
- - my-datavolume:/var/lib/mysql
- networks:
- - proxy_net
- ports:
- - '3306:3306'
- redis:
- image: redis
- container_name: redis
- networks:
- - proxy_net
- ports:
- - '6379:6379'
- frontend:
- image: mrdaniel123/see-mode-frontend
- container_name: frontend
- networks:
- - proxy_net
- ports:
- - '3000:80'
- environment:
- - HOST=0.0.0.0
- backend:
- image: mrdaniel123/see-mode-backend
- container_name: see-mode-backend
- ports: ['8000:8000', '80:80']
- expose: ['8000']
- command: >
- /bin/bash -c "
- while ! nc -z redis 6379;
- do
- echo Waiting for Redis;
- sleep 1;
- done;
- echo Connected to redis!;
- while ! nc -z mysql 3306;
- do
- echo Waiting for MySql;
- sleep 1;
- done;
- echo Connected to mysql!;
- echo Allowing time for DB initialization...;
- sleep 15
- echo Running startup!;
- chmod +x startup.local.sh
- ./startup.local.sh
- "
- depends_on:
- - redis
- - mysql
- environment:
- - ENV=LOCALDEPLOY
- - VIRTUAL_HOST=dev-backend.see-mode.com
- - VIRTUAL_PORT=8000
- - DJANGO_SETTINGS_MODULE=seemodeserver.settings_local
- - STAGING_ENV=True
- networks:
- - proxy_net
- worker:
- image: mrdaniel123/see-mode-worker
- container_name: see-mode-worker
- command: >
- /bin/bash -c "
- while ! nc -z redis 6379;
- do
- echo Waiting for Redis;
- sleep 1;
- done;
- echo Connected to redis!;
- echo Allowing time for Redis Queue initialization...;
- sleep 30
- echo Running startup!;
- chmod +x startup.sh
- ./startup.sh
- "
- depends_on:
- - redis
- - backend
- environment:
- - ENV=LOCALDEPLOY
- - STAGING_ENV=FALSE
- networks:
- - proxy_net
- volumes:
- my-datavolume:
- networks:
- proxy_net:
- driver: bridge
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement