This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Log into scaleway docker registry | |
command: docker login {{ scaleway_registry }} -u {{ scaleway_user }} -p {{ scaleway_token }} | |
no_log: true | |
- name: Pull docker images | |
command: docker-compose pull | |
args: | |
chdir: "{{ docker_compose_path }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: web_server | |
roles: | |
- role: deploy-docker | |
vars: | |
docker_compose_path: /etc/docker/ | |
vars_files: | |
- vars/scaleway_credentials.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[staging:children] | |
web_server | |
[web_server] | |
163.172.214.134 ansible_user=root ansible_become=yes # ICI VALUER LA BONNE IP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "2.1" | |
executors: | |
node: | |
docker: | |
- image: circleci/node:14.16.0 | |
ubuntu: | |
machine: | |
image: ubuntu-2004:202010-01 | |
jobs: | |
build-docker-image: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ----- build image ----- | |
FROM node:14.15.0-alpine AS build-env | |
WORKDIR /app | |
COPY . /app | |
RUN yarn install | |
RUN yarn build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
cd "$(dirname "$0")" | |
VERSION="$(git describe --always | sed 's/^v//')" | |
PACKAGE="$(git config --get remote.origin.url | awk -F '@[^:/]+[:/]?' '{print $(NF)}' | sed s'/.git$//')" | |
DOCKER_TAG=${DOCKER_TAG:-$VERSION} | |
DOCKER_REGISTRY=${DOCKER_REGISTRY:=rg.fr-par.scw.cloud/thetribe} # ICI VALUER LE BON REGISTRY DOCKER | |
DOCKER_IMAGE=${DOCKER_IMAGE:=$DOCKER_REGISTRY/$PACKAGE:$DOCKER_TAG} | |
DOCKERFILE=${DOCKERFILE:-"Dockerfile"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.5" | |
services: | |
backend: | |
image: rg.fr-par.scw.cloud/thetribe/backend:latest | |
restart: unless-stopped | |
container_name: backend | |
working_dir: /app | |
expose: - "8080" | |
ports: - "8080:8080" | |
environment: - NODE_ENV=staging |