diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 88f196a..48bdb7f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,9 +24,9 @@ jobs: - name: Run tests run: | - if [ -f docker-compose.github.test.yml ]; then - docker-compose --file docker-compose.github.test.yml build - docker-compose --file docker-compose.github.test.yml run sut + if [ -f docker-compose.ci.yml ]; then + docker-compose --file docker-compose.ci.yml build + docker-compose --file docker-compose.ci.yml run sut else docker build . --file Dockerfile fi diff --git a/docker-compose.github.test.yml b/docker-compose.ci.yml similarity index 95% rename from docker-compose.github.test.yml rename to docker-compose.ci.yml index e46ea08..182fa06 100644 --- a/docker-compose.github.test.yml +++ b/docker-compose.ci.yml @@ -7,7 +7,7 @@ services: build: context: ./ dockerfile: Dockerfile.test - image: yey007/transcriberbot:latest + image: ghcr.io/yey007/transcriberbot:latest command: sh -c "./wait-for db:3306 -- npm test" environment: - DISCORD_TOKEN diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml new file mode 100644 index 0000000..4452069 --- /dev/null +++ b/docker-compose.dev.yml @@ -0,0 +1,36 @@ +version: '3.8' + +services: + bot: + privileged: true + container_name: bot + build: ./ + image: yey007/transcriberbot:latest + restart: always + command: sh -c "./wait-for db:3306 -- npm start" + env_file: + - ./bot.env + - ./db.env + environment: + - NODE_ENV=development + depends_on: + - db + networks: + - my_network + + db: + container_name: db + image: mysql + command: --default-authentication-plugin=mysql_native_password + restart: always + env_file: + - ./db.env + expose: + - 3306 + networks: + - my_network + +networks: + my_network: + name: my_network + driver: bridge diff --git a/docker-compose.yml b/docker-compose.yml index ab041b2..33de672 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: privileged: true container_name: bot build: ./ - image: yey007/transcriberbot:latest + image: ghcr.io/yey007/transcriberbot:latest restart: always command: sh -c "./wait-for db:3306 -- npm start" env_file: