Verified Commit e3704bcb authored by David Haynes's avatar David Haynes 🙆
Browse files

Complete stack/swarm adoption

- basically copy everything from Go
parent 76502b7e
version: '2'
version: '3'
services:
wopen_web:
build: .
restart: always
db:
image: mysql
deploy:
replicas: 1
restart_policy:
condition: on-failure
networks:
- wopen_net
ports:
- "3306:3306"
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
MYSQL_DATABASE: wopen
MYSQL_USER: wopen
MYSQL_PASSWORD: wopen
api:
image: whats-open-api
deploy:
replicas: 1
restart_policy:
condition: on-failure
networks:
- wopen_net
ports:
- '8000:8000'
command: /bin/bash ./startup.sh
volumes:
- .:/whats_open
- .:/whats-open
depends_on:
- wopen_db
- db
environment:
- WOPEN_EMAIL_DOMAIN=@masonlive.gmu.edu
- WOPEN_DB_NAME=wopen
- WOPEN_DB_USER=wopen
- WOPEN_DB_PASSWORD=wopen
- WOPEN_DB_HOST=wopen_db
- WOPEN_DB_HOST=db
- WOPEN_DB_PORT=3306
- WOPEN_SUPERUSER=admin
wopen_db:
image: mysql
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
MYSQL_DATABASE: wopen
MYSQL_USER: wopen
MYSQL_PASSWORD: wopen
\ No newline at end of file
networks:
wopen_net:
\ No newline at end of file
until nc -z wopen_db 3306; do
until nc -z db 3306; do
echo "waiting for database to start..."
sleep 1
done
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment