-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-e2e.yml
61 lines (56 loc) · 1.33 KB
/
docker-compose-e2e.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
version: "3"
services:
pgdb:
container_name: pgdb
# use latest official postgres version
image: "postgres:alpine"
env_file:
# configure postgres
- ./postgres/database.env
expose:
# only avaliable in docker network
# needed for food_api connection
- "5432"
volumes:
# persist data even if container shuts down
# - auth_data:/var/lib/postgresql/data/
# run init sql script to create tables
- ./postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- net
restart: on-failure
oauth:
container_name: oauth
build: ./
image: dv4all/go-oauth:0.6.0-alpine3.12
env_file:
- ./oauth2.env
# ports:
# - "8080:8080"
expose:
- "8080"
networks:
- net
depends_on:
- pgdb
restart: on-failure
cypress:
container_name: cypress
image: "cypress/included:4.10.0"
depends_on:
- pgdb
- oauth
environment:
# pass base url to test pointing at the web application
- CYPRESS_baseUrl=http://oauth:8080
volumes:
# copy all from current dir into cypress container to e2e folder
- ./e2e:/e2e
# Cypress treats the /e2e directory as its current folder in the filesystem
working_dir: /e2e
networks:
- net
networks:
net:
# volumes:
# auth_data: